@@ -307,7 +307,7 @@ start_cluster 4 4 {tags {external:skip cluster} overrides {cluster-node-timeout
307307# - Node 0 (stopped)
308308# - Node 3 (replica of 4)
309309# - Node 4 (new primary)
310- # - Node 7 (still replicating from 0)
310+ # - Node 7 (blocked at main thread, still trying to replicate from 0)
311311# all belong to the same shard, but node 7 remains in an outdated state.
312312#
313313# When node 7 times out and reconnects, its outbound links are still valid, so it sends
@@ -330,6 +330,9 @@ proc test_blocked_replica_stale_state_race {type} {
330330 R 3 config set cluster-replica-validity-factor 0
331331 R 7 config set cluster-replica-validity-factor 0
332332 R 3 config set cluster-allow-replica-migration yes
333+ # In the test_sub_replica test case above, the config cluster-allow-replica-migration
334+ # is turned off and thus R7 could become sub-replica. Here, we show that even with this
335+ # config turned on, R7 could also become sub-replica.
333336 R 7 config set cluster-allow-replica-migration yes
334337
335338 populate_data
@@ -383,10 +386,11 @@ proc test_blocked_replica_stale_state_race {type} {
383386# stale PING packets from server 4 (via inbound link) before receiving PONG reply
384387# from it (via outbound link), the tricky empty primary scenario won't happen,
385388# and thus this test case won't be applicable.
386-
387- # start_cluster 4 4 {tags {external:skip cluster} overrides {cluster-node-timeout 1000 cluster-migration-barrier 999}} {
388- # test_blocked_replica_stale_state_race "sigstop"
389- # } my_slot_allocation cluster_allocate_replicas ;# start_cluster
389+ if {0} {
390+ start_cluster 4 4 {tags {external:skip cluster} overrides {cluster-node-timeout 1000 cluster-migration-barrier 999}} {
391+ test_blocked_replica_stale_state_race " sigstop"
392+ } my_slot_allocation cluster_allocate_replicas ;# start_cluster
393+ }
390394
391395proc test_cluster_setslot {type} {
392396 test " valkey-cli make source node ignores NOREPLICAS error when doing the last CLUSTER SETSLOT - $type " {
0 commit comments