summaryrefslogtreecommitdiff
path: root/dev-db/redis/files
diff options
context:
space:
mode:
authorPetr Vaněk <arkamar@atlas.cz>2022-09-23 09:53:56 +0200
committerSam James <sam@gentoo.org>2022-09-25 02:20:27 +0100
commitfd92a504228d5932eaaf750ea469e8ed63b3fd04 (patch)
treed4b4d5be4b50aa6033188e4728e04ab79706cb80 /dev-db/redis/files
parent9c93e299c4c4db9edf7c120a87a6f132cbbdfef8 (diff)
downloadgentoo-fd92a504228d5932eaaf750ea469e8ed63b3fd04.tar.gz
gentoo-fd92a504228d5932eaaf750ea469e8ed63b3fd04.tar.bz2
gentoo-fd92a504228d5932eaaf750ea469e8ed63b3fd04.zip
dev-db/redis: fix sometime failing tests due to bgsaveerr issue
This change backports patch from upstream PR #11043 in order to properly solve bug #872278 reported for version 7.0.4 which affects version 7.0.5 as well. In upstream, the fix is not part of 7.0 branch, it is only present in unstable branch. Upstream-PR: https://github.com/redis/redis/pull/11043 Bug: https://bugs.gentoo.org/860372 Bug: https://bugs.gentoo.org/872278 Signed-off-by: Petr Vaněk <arkamar@atlas.cz> Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-db/redis/files')
-rw-r--r--dev-db/redis/files/redis-7.0.4-replica-tests-fix.patch61
1 files changed, 61 insertions, 0 deletions
diff --git a/dev-db/redis/files/redis-7.0.4-replica-tests-fix.patch b/dev-db/redis/files/redis-7.0.4-replica-tests-fix.patch
new file mode 100644
index 000000000000..55da00137b46
--- /dev/null
+++ b/dev-db/redis/files/redis-7.0.4-replica-tests-fix.patch
@@ -0,0 +1,61 @@
+From e7144693e2446f21ee68c95676ecf65d1351d13e Mon Sep 17 00:00:00 2001
+From: Binbin <binloveplay1314@qq.com>
+Date: Wed, 27 Jul 2022 19:58:25 +0800
+Subject: [PATCH] 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.
+---
+
+This patch is backported from upstream, see PR #11043.
+
+Upstream-PR: https://github.com/redis/redis/pull/11043
+
+diff --git a/tests/integration/replication.tcl b/tests/integration/replication.tcl
+index d60c91918..457c3150e 100644
+--- a/tests/integration/replication.tcl
++++ b/tests/integration/replication.tcl
+@@ -1289,7 +1289,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
+ }
+
+@@ -1307,7 +1306,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
+ }
+
+@@ -1328,7 +1326,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
+ }
+
+@@ -1347,7 +1344,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
+ }
+
+--
+2.35.1
+