Skip to content

Commit

Permalink
Merge branch 'valkey-io:unstable' into unstable
Browse files Browse the repository at this point in the history
  • Loading branch information
parthpatel authored Nov 4, 2024
2 parents 181760b + 3c32ee1 commit 955a8fb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/cluster_legacy.c
Original file line number Diff line number Diff line change
Expand Up @@ -2981,7 +2981,7 @@ int clusterIsValidPacket(clusterLink *link) {
return 0;
}

if (type == server.cluster_drop_packet_filter) {
if (type == server.cluster_drop_packet_filter || server.cluster_drop_packet_filter == -2) {
serverLog(LL_WARNING, "Dropping packet that matches debug drop filter");
return 0;
}
Expand Down Expand Up @@ -3070,7 +3070,8 @@ int clusterProcessPacket(clusterLink *link) {
if (!clusterIsValidPacket(link)) {
clusterMsg *hdr = (clusterMsg *)link->rcvbuf;
uint16_t type = ntohs(hdr->type);
if (server.debug_cluster_close_link_on_packet_drop && type == server.cluster_drop_packet_filter) {
if (server.debug_cluster_close_link_on_packet_drop &&
(type == server.cluster_drop_packet_filter || server.cluster_drop_packet_filter == -2)) {
freeClusterLink(link);
serverLog(LL_WARNING, "Closing link for matching packet type %hu", type);
return 0;
Expand Down
2 changes: 1 addition & 1 deletion src/debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ void debugCommand(client *c) {
" Some fields of the default behavior may be time consuming to fetch,",
" and `fast` can be passed to avoid fetching them.",
"DROP-CLUSTER-PACKET-FILTER <packet-type>",
" Drop all packets that match the filtered type. Set to -1 allow all packets.",
" Drop all packets that match the filtered type. Set to -1 allow all packets or -2 to drop all packets.",
"CLOSE-CLUSTER-LINK-ON-PACKET-DROP <0|1>",
" This is valid only when DROP-CLUSTER-PACKET-FILTER is set to a valid packet type.",
" When set to 1, the cluster link is closed after dropping a packet based on the filter.",
Expand Down

0 comments on commit 955a8fb

Please sign in to comment.