]> git.ipfire.org Git - thirdparty/knot-dns.git/commitdiff
redis: use expliciti initial stream ID based on the time of server start
authorDaniel Salzman <daniel.salzman@nic.cz>
Wed, 26 Nov 2025 12:09:37 +0000 (13:09 +0100)
committerDaniel Salzman <daniel.salzman@nic.cz>
Wed, 26 Nov 2025 15:06:08 +0000 (16:06 +0100)
src/knot/server/server.c

index 8b24918c116179561ce2e3c3f32362e5b1a80f5b..cedb88b3adf191bc2318cdefdd28bf9f28de0355 100644 (file)
@@ -938,7 +938,10 @@ static int rdb_listener_run(struct dthread *thread)
        server_t *s = thread->data;
 
        s->rdb_ctx = NULL;
+
+       const uint64_t prop_delay = 60; // Maximum considered propagation delay to all replicas.
        char since[RDB_TIMESTAMP_SIZE] = "$";
+       (void)snprintf(since, sizeof(since), "%"PRIu64"-0", (knot_time() - prop_delay) * 1000);
 
        while (thread->state & ThreadActive) {
                if (s->rdb_ctx == NULL) {