diff options
author | Madelyn Olson <34459052+madolson@users.noreply.github.com> | 2022-07-10 22:00:44 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-10 22:00:44 -0700 |
commit | e6a1b2ea9534053213cb92b08f610f07c381695d (patch) | |
tree | be28e47581950398cd9abc53ccd4cf4a915f0826 /tests/cluster/tests | |
parent | 1209dc2277342491b100f298d311510c86b0a2f2 (diff) | |
download | redis-e6a1b2ea9534053213cb92b08f610f07c381695d.tar.gz |
Fix crash during handshake and cluster shards call (#10942)
* Fix an engine crash when there are nodes in handshaking and a user calls cluster shards
Diffstat (limited to 'tests/cluster/tests')
-rw-r--r-- | tests/cluster/tests/28-cluster-shards.tcl | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/tests/cluster/tests/28-cluster-shards.tcl b/tests/cluster/tests/28-cluster-shards.tcl index fe794f2b7..9894d4b33 100644 --- a/tests/cluster/tests/28-cluster-shards.tcl +++ b/tests/cluster/tests/28-cluster-shards.tcl @@ -182,4 +182,17 @@ test "Test the replica reports a loading state while it's loading" { # Final sanity, the replica agrees it is online. assert_equal "online" [dict get [get_node_info_from_shard $replica_cluster_id $replica_id "node"] health] -}
\ No newline at end of file +} + +test "Regression test for a crash when calling SHARDS during handshake" { + # Reset forget a node, so we can use it to establish handshaking connections + set id [R 19 CLUSTER MYID] + R 19 CLUSTER RESET HARD + for {set i 0} {$i < 19} {incr i} { + R $i CLUSTER FORGET $id + } + R 19 cluster meet 127.0.0.1 [get_instance_attrib redis 0 port] + # This should line would previously crash, since all the outbound + # connections were in handshake state. + R 19 CLUSTER SHARDS +} |