Repository navigation
Conversation
…tion instances
The operator now forces repl-diskless-sync to no on every instance that loads
the replication module (redis-operator !823, release-5.1), whatever customConfig
or the parameter template sets. Add that to the configuration limitations, next
to the AOF entry, with the reason and the effects users can see.
Why: the module records the RDB file on disk as the snapshot of every completed
fork, and a diskless transfer (a full synchronization to a replica under
repl-diskless-sync yes, or redis-cli --rdb) is a fork that never rewrites that
file. A new or emptied peer that takes a full synchronization from such a record
receives the older file and resumes the Oplog past the writes it is missing.
The module team reproduced it on the Redis 7.2 module; the legacy 6.0 module is
affected too, and serves any record whose file size still matches.
What users see, verified against redis-operator release-5.1 with !823 and a kind
upgrade from 00ec5030: the setting is a hot update with no pod restart; when an
operator upgrade switches a running instance from yes to no, the operator runs
one BGSAVE on every node; save is left exactly as configured, so the diskless
parameter template keeps its empty save. Redis 7.2 defaults the setting to yes,
every Redis 7.2 parameter template sets yes, and so does the Redis 6.0 diskless
template (chart-middleware middleware/charts/redis-param/templates/
redis-{6.0,7.2}-paramtemplate-*.yaml).
Also correct the Oplog file size in "Replication increases storage pressure":
the new module cuts the Oplog file at 1 GiB (max-oplog-file-size in
redis-modules active-redis/src/config.zig; the operator does not override it),
while 3 GiB is the legacy 6.0 module's DefaultMaxOpLogFileSize
(active-redis-6.0/src/storage.h).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
repl-diskless-sync noon every replication instance, that the change is a hot update without pod restarts, that an operator upgrade switching a running instance fromyestonotriggers oneBGSAVEper node, thatsavestays as configured, and the visible effect: replica full synchronizations and backups first write an RDB file to disk, including with the diskless parameter template.Sources
internal/builder/modules.go(DisableDisklessSyncForActiveRedis) is called after the default-save decision ininternal/builder/clusterbuilder/configmap.goandinternal/builder/failoverbuilder/configmap.go; the per-nodeBGSAVEon the flip is ininternal/ops/{cluster,failover}/actor/actor_update_config.go. Verified with a kind upgrade from release-5.100ec5030.middleware/charts/redis-param/templates/redis-7.2-paramtemplate-{0,1,2}.yaml(all setrepl-diskless-sync: 'yes') andredis-6.0-paramtemplate-1.yaml(the 6.0 diskless template,'yes').active-redis/src/config.zig(max-oplog-file-size, default 1 GiB; the operator passes onlyoplog-dir) andactive-redis-6.0/src/storage.h(DefaultMaxOpLogFileSize, 3 GiB).Notes
1a22de77); the behaviour ships from the release-5.1 buildv5.1.0-rc.64.g1a22de77on.doom lint: 0 errors, 0 warnings.