mirror of
https://github.com/redis/redis.git
synced 2026-02-03 20:39:54 -05:00
During fullsync, before loading RDB on the replica, we stop aof child to prevent copy-on-write disaster. Once rdb is loaded, aof is started again and it will trigger aof rewrite. With https://github.com/redis/redis/pull/13732 , for rdbchannel replication, this behavior was changed. Currently, we start aof after replication buffer is streamed to db. This PR changes it back to start aof just after rdb is loaded (before repl buffer is streamed) Both approaches may have pros and cons. If we start aof before streaming repl buffers, we may still face with copy-on-write issues as repl buffers potentially include large amount of changes. If we wait until replication buffer drained, it means we are delaying starting aof persistence. Additional changes are introduced as part of this PR: - Interface change: Added `mem_replica_full_sync_buffer` field to the `INFO MEMORY` command reply. During full sync, it shows total memory consumed by accumulated replication stream buffer on replica. Added same metric to `MEMORY STATS` command reply as `replica.fullsync.buffer` field. - Fixes: - Count repl stream buffer size of replica as part of 'memory overhead' calculation for fields in "INFO MEMORY" and "MEMORY STATS" outputs. Before this PR, repl buffer was not counted as part of memory overhead calculation, causing misreports for fields like `used_memory_overhead` and `used_memory_dataset` in "INFO STATS" and for `overhead.total` field in "MEMORY STATS" command reply. - Dismiss replication stream buffers memory of replica in the fork to reduce COW impact during a fork. - Fixed a few time sensitive flaky tests, deleted a noop statement, fixed some comments and fail messages in rdbchannel tests. |
||
|---|---|---|
| .. | ||
| aof-multi-part.tcl | ||
| aof-race.tcl | ||
| aof.tcl | ||
| block-repl.tcl | ||
| convert-ziplist-hash-on-load.tcl | ||
| convert-ziplist-zset-on-load.tcl | ||
| convert-zipmap-hash-on-load.tcl | ||
| corrupt-dump-fuzzer.tcl | ||
| corrupt-dump.tcl | ||
| dismiss-mem.tcl | ||
| failover.tcl | ||
| logging.tcl | ||
| psync2-master-restart.tcl | ||
| psync2-pingoff.tcl | ||
| psync2-reg.tcl | ||
| psync2.tcl | ||
| rdb.tcl | ||
| redis-benchmark.tcl | ||
| redis-cli.tcl | ||
| replication-2.tcl | ||
| replication-3.tcl | ||
| replication-4.tcl | ||
| replication-buffer.tcl | ||
| replication-psync.tcl | ||
| replication-rdbchannel.tcl | ||
| replication.tcl | ||
| shutdown.tcl | ||