summaryrefslogtreecommitdiff
path: root/src/expire.c
diff options
context:
space:
mode:
authorjudeng <abc3844@126.com>2023-02-20 16:23:25 +0800
committerGitHub <noreply@github.com>2023-02-20 10:23:25 +0200
commit40659c342487fba6ef98444c7b9bb6cad9794f18 (patch)
tree4f3c0a96eee97932d06d7ed2d62c383873e321b0 /src/expire.c
parent3ac835777cf835caf79022e44030cc724fd79ce4 (diff)
downloadredis-40659c342487fba6ef98444c7b9bb6cad9794f18.tar.gz
add test case and comments for active expiry in the writeable replica (#11789)
This test case is to cover a edge scenario: when a writable replica enabled AOF at the same time, active expiry keys which was created in writable replicas should propagate to the AOF file, and some versions might crash (fixed by #11615). For details, please refer to #11778
Diffstat (limited to 'src/expire.c')
-rw-r--r--src/expire.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/expire.c b/src/expire.c
index d07e22f66..425491af6 100644
--- a/src/expire.c
+++ b/src/expire.c
@@ -385,7 +385,8 @@ void expireSlaveKeys(void) {
activeExpireCycleTryExpire(server.db+dbid,expire,start))
{
expired = 1;
- /* DELs aren't propagated, but modules may want their hooks. */
+ /* Propagate the DEL (writable replicas do not propagate anything to other replicas,
+ * but they might propagate to AOF) and trigger module hooks. */
postExecutionUnitOperations();
}