-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
49362: cli/quit: proceed with hard shutdown even with short --drain-wait r=tbg a=knz Found while investigating #49359. :facepalm: on my side for not testing this. Also :zap: on grpc for cooking their own error protocol that's incompatible with Go's. Release note (bug fix): When the value passed to `--drain-wait` is very small, but non-zero, `cockroach quit` in certain cases would not proceed to perform a hard shutdown. This has been corrected. This bug existed since v19.1.9, v19.2.7 and v20.1.1. Co-authored-by: Raphael 'kena' Poss <[email protected]>
- Loading branch information
Showing
3 changed files
with
36 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#! /usr/bin/env expect -f | ||
# | ||
source [file join [file dirname $argv0] common.tcl] | ||
|
||
start_server $argv | ||
|
||
spawn /bin/bash | ||
send "PS1=':''/# '\r" | ||
eexpect ":/# " | ||
|
||
start_test "Test that quit with a very short timeout still proceeds with hard shutdown" | ||
|
||
send "$argv quit --insecure --drain-wait=1ns\r" | ||
eexpect "drain did not complete successfully" | ||
eexpect "hard shutdown" | ||
eexpect "ok" | ||
eexpect ":/# " | ||
|
||
end_test | ||
|
||
stop_server $argv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters