Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-db/redis/, dev-db/redis/files/
Date: Sun, 25 Sep 2022 01:21:20
Message-Id: 1664068827.fd92a504228d5932eaaf750ea469e8ed63b3fd04.sam@gentoo
1 commit: fd92a504228d5932eaaf750ea469e8ed63b3fd04
2 Author: Petr Vaněk <arkamar <AT> atlas <DOT> cz>
3 AuthorDate: Fri Sep 23 07:53:56 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Sun Sep 25 01:20:27 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fd92a504
7
8 dev-db/redis: fix sometime failing tests due to bgsaveerr issue
9
10 This change backports patch from upstream PR #11043 in order to properly
11 solve bug #872278 reported for version 7.0.4 which affects version 7.0.5
12 as well. In upstream, the fix is not part of 7.0 branch, it is only
13 present in unstable branch.
14
15 Upstream-PR: https://github.com/redis/redis/pull/11043
16 Bug: https://bugs.gentoo.org/860372
17 Bug: https://bugs.gentoo.org/872278
18 Signed-off-by: Petr Vaněk <arkamar <AT> atlas.cz>
19 Signed-off-by: Sam James <sam <AT> gentoo.org>
20
21 .../files/redis-7.0.4-replica-tests-fix.patch | 61 ++++++++++++++++++++++
22 dev-db/redis/redis-7.0.4.ebuild | 1 +
23 dev-db/redis/redis-7.0.5.ebuild | 1 +
24 3 files changed, 63 insertions(+)
25
26 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
27 new file mode 100644
28 index 000000000000..55da00137b46
29 --- /dev/null
30 +++ b/dev-db/redis/files/redis-7.0.4-replica-tests-fix.patch
31 @@ -0,0 +1,61 @@
32 +From e7144693e2446f21ee68c95676ecf65d1351d13e Mon Sep 17 00:00:00 2001
33 +From: Binbin <binloveplay1314@××.com>
34 +Date: Wed, 27 Jul 2022 19:58:25 +0800
35 +Subject: [PATCH] Fix bgsaveerr issue in psync wrong offset test (#11043)
36 +
37 +The kill above is sometimes successful and sometimes already too late.
38 +The PING in pysnc wrong offset test got rejected by bgsaveerr because
39 +lastbgsave_status is C_ERR.
40 +
41 +In theory, using diskless can avoid PING being affected, because when
42 +the replica is dropped, we will kill the child with SIGUSR1, and this
43 +will not affect lastbgsave_status.
44 +
45 +Anyway, this kill is not particularly needed here, dropping the kill
46 +is the best one, since we do have the waitForBgsave, so just let it
47 +take care of the bgsave. No need for fast termination.
48 +---
49 +
50 +This patch is backported from upstream, see PR #11043.
51 +
52 +Upstream-PR: https://github.com/redis/redis/pull/11043
53 +
54 +diff --git a/tests/integration/replication.tcl b/tests/integration/replication.tcl
55 +index d60c91918..457c3150e 100644
56 +--- a/tests/integration/replication.tcl
57 ++++ b/tests/integration/replication.tcl
58 +@@ -1289,7 +1289,6 @@ start_server {tags {"repl" "external:skip"}} {
59 + verify_log_message 0 "*Replica generated a reply to command 'ping', disconnecting it: *" $lines
60 +
61 + $rd close
62 +- catch {exec kill -9 [get_child_pid 0]}
63 + waitForBgsave r
64 + }
65 +
66 +@@ -1307,7 +1306,6 @@ start_server {tags {"repl" "external:skip"}} {
67 + verify_log_message 0 "*Replica generated a reply to command 'xinfo|help', disconnecting it: *" $lines
68 +
69 + $rd close
70 +- catch {exec kill -9 [get_child_pid 0]}
71 + waitForBgsave r
72 + }
73 +
74 +@@ -1328,7 +1326,6 @@ start_server {tags {"repl" "external:skip"}} {
75 + verify_log_message 0 "*Replica can't interact with the keyspace*" $lines
76 +
77 + $rd close
78 +- catch {exec kill -9 [get_child_pid 0]}
79 + waitForBgsave r
80 + }
81 +
82 +@@ -1347,7 +1344,6 @@ start_server {tags {"repl" "external:skip"}} {
83 + verify_log_message 0 "*Replica generated a reply to command 'slowlog|get', disconnecting it: *" $lines
84 +
85 + $rd close
86 +- catch {exec kill -9 [get_child_pid 0]}
87 + waitForBgsave r
88 + }
89 +
90 +--
91 +2.35.1
92 +
93
94 diff --git a/dev-db/redis/redis-7.0.4.ebuild b/dev-db/redis/redis-7.0.4.ebuild
95 index 773c003e309f..2cf77ae9969e 100644
96 --- a/dev-db/redis/redis-7.0.4.ebuild
97 +++ b/dev-db/redis/redis-7.0.4.ebuild
98 @@ -53,6 +53,7 @@ PATCHES=(
99 "${FILESDIR}"/${PN}-6.2.3-ppc-atomic.patch
100 "${FILESDIR}"/${PN}-sentinel-5.0-config.patch
101 "${FILESDIR}"/${PN}-7.0.4-no-which.patch
102 + "${FILESDIR}"/${PN}-7.0.4-replica-tests-fix.patch
103 )
104
105 src_prepare() {
106
107 diff --git a/dev-db/redis/redis-7.0.5.ebuild b/dev-db/redis/redis-7.0.5.ebuild
108 index d16e991e2f8b..6df6a3e08780 100644
109 --- a/dev-db/redis/redis-7.0.5.ebuild
110 +++ b/dev-db/redis/redis-7.0.5.ebuild
111 @@ -53,6 +53,7 @@ PATCHES=(
112 "${FILESDIR}"/${PN}-6.2.3-ppc-atomic.patch
113 "${FILESDIR}"/${PN}-sentinel-5.0-config.patch
114 "${FILESDIR}"/${PN}-7.0.4-no-which.patch
115 + "${FILESDIR}"/${PN}-7.0.4-replica-tests-fix.patch
116 )
117
118 src_prepare() {