Skip to content

Commit 6f97863

Browse files
enjoy-binbinzuiderkwast
authored andcommitted
Avoid timing issue in diskless-load-swapdb test (valkey-io#1077)
Since we paused the primary node earlier, the replica may enter cluster down due to primary node pfail. Here set allow read to prevent subsequent read errors. Signed-off-by: Binbin <[email protected]>
1 parent 115d403 commit 6f97863

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

tests/unit/cluster/diskless-load-swapdb.tcl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,11 @@ test "Main db not affected when fail to diskless load" {
7878
fail "Fail to stop the full sync"
7979
}
8080

81+
# Since we paused the primary node earlier, the replica may enter
82+
# cluster down due to primary node pfail. Here set allow read to
83+
# prevent subsequent read errors.
84+
$replica config set cluster-allow-reads-when-down yes
85+
8186
# Replica keys and keys to slots map still both are right
8287
assert_equal {1} [$replica get $slot0_key]
8388
assert_equal $slot0_key [$replica CLUSTER GETKEYSINSLOT 0 1]

0 commit comments

Comments
 (0)