File tree Expand file tree Collapse file tree 1 file changed +21
-1
lines changed
pkg/cli/interactive_tests Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ send "\\demo restart 3\r"
65
65
eexpect " node 3 has been restarted"
66
66
eexpect " defaultdb>"
67
67
68
- set timeout 1
68
+ set timeout 2
69
69
set stmt " select node_id, draining, membership from crdb_internal.kv_node_liveness ORDER BY node_id;\r "
70
70
send $stmt
71
71
expect {
@@ -90,6 +90,26 @@ eexpect "4 | f | active"
90
90
eexpect " 5 | f | active"
91
91
eexpect " defaultdb>"
92
92
93
+ # Wait for the liveness range to have the default 5 voters. If its replication
94
+ # factor is too low, shutting down the node below can cause it to lose quorum
95
+ # and stall the decommissioning command (example: #147867).
96
+ set timeout 2
97
+ set stmt " select range_id, array_length(voting_replicas,1) from crdb_internal.ranges where range_id=2;\r "
98
+ send $stmt
99
+ expect {
100
+ " 2 | 5" {
101
+ puts " \r liveness range has 5 voters"
102
+ }
103
+ timeout {
104
+ puts " \r liveness range does not yet have 5 voters"
105
+ sleep 2
106
+ send $stmt
107
+ exp_continue
108
+ }
109
+ }
110
+ # Reset timeout back to 45 to match common.tcl.
111
+ set timeout 45
112
+
93
113
# Try decommissioning commands
94
114
send " \\ demo decommission 4\r "
95
115
eexpect " node is draining"
You can’t perform that action at this time.
0 commit comments