summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBinbin <binloveplay1314@qq.com>2022-07-27 19:58:25 +0800
committerOran Agra <oran@redislabs.com>2022-12-12 17:36:34 +0200
commit98410d0da5f237967757d35bdd06a1f990b41129 (patch)
treeae175396e9fe6822fb192279deba2824cf5d73dd
parent9ccb8dfd4789daf3329a0da9a5c80e07fba7b5c7 (diff)
downloadredis-98410d0da5f237967757d35bdd06a1f990b41129.tar.gz
Fix bgsaveerr issue in psync wrong offset test (#11043)
The kill above is sometimes successful and sometimes already too late. The PING in pysnc wrong offset test got rejected by bgsaveerr because lastbgsave_status is C_ERR. In theory, using diskless can avoid PING being affected, because when the replica is dropped, we will kill the child with SIGUSR1, and this will not affect lastbgsave_status. Anyway, this kill is not particularly needed here, dropping the kill is the best one, since we do have the waitForBgsave, so just let it take care of the bgsave. No need for fast termination. (cherry picked from commit e7144693e2446f21ee68c95676ecf65d1351d13e)
-rw-r--r--tests/integration/replication.tcl4
1 files changed, 0 insertions, 4 deletions
diff --git a/tests/integration/replication.tcl b/tests/integration/replication.tcl
index 4acc28f75..41300800c 100644
--- a/tests/integration/replication.tcl
+++ b/tests/integration/replication.tcl
@@ -1328,7 +1328,6 @@ start_server {tags {"repl" "external:skip"}} {
verify_log_message 0 "*Replica generated a reply to command 'ping', disconnecting it: *" $lines
$rd close
- catch {exec kill -9 [get_child_pid 0]}
waitForBgsave r
}
@@ -1346,7 +1345,6 @@ start_server {tags {"repl" "external:skip"}} {
verify_log_message 0 "*Replica generated a reply to command 'xinfo|help', disconnecting it: *" $lines
$rd close
- catch {exec kill -9 [get_child_pid 0]}
waitForBgsave r
}
@@ -1367,7 +1365,6 @@ start_server {tags {"repl" "external:skip"}} {
verify_log_message 0 "*Replica can't interact with the keyspace*" $lines
$rd close
- catch {exec kill -9 [get_child_pid 0]}
waitForBgsave r
}
@@ -1386,7 +1383,6 @@ start_server {tags {"repl" "external:skip"}} {
verify_log_message 0 "*Replica generated a reply to command 'slowlog|get', disconnecting it: *" $lines
$rd close
- catch {exec kill -9 [get_child_pid 0]}
waitForBgsave r
}