Align READONLY and READWRITE with Redis cluster semantics - #2109
Open
Vasileios Zois (vazois) wants to merge 5 commits into
Open
Align READONLY and READWRITE with Redis cluster semantics#2109Vasileios Zois (vazois) wants to merge 5 commits into
Vasileios Zois (vazois) wants to merge 5 commits into
Conversation
Vasileios Zois (vazois)
force-pushed
the
vazois/rw-semantics-fix
branch
from
September 8, 2026 21:24
e1308f5 to
fd9de78
Compare
Vasileios Zois (vazois)
force-pushed
the
vazois/rw-semantics-fix
branch
from
September 8, 2026 21:33
fd9de78 to
9f83807
Compare
Vasileios Zois (vazois)
marked this pull request as ready for review
September 8, 2026 21:33
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The public IClusterSession source-breaking change must be preserved compatibly or explicitly documented as breaking.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Aligns replica read/write behavior with Redis semantics while isolating internal AOF replay permissions.
Changes:
- Makes
READONLYcontrol replica-local reads only; client writes always redirect. - Adds an internal replay-write capability and fixed
slave-read-only=yes. - Updates tests and documentation.
Metadata: Description is accurate. Recommended title: [Cluster] Align READONLY and READWRITE with Redis cluster semantics.
File summaries
| File | Description |
|---|---|
website/docs/commands/cluster.md |
Clarifies command semantics. |
website/docs/cluster/replication.md |
Updates replica usage guidance. |
test/standalone/Garnet.test/RespConfigTests.cs |
Verifies fixed config value. |
test/standalone/Garnet.test/RespAdminCommandsTests.cs |
Updates config expectation. |
test/cluster/Garnet.test.cluster/ClusterTestUtils.cs |
Enables replica reads in tests. |
test/cluster/Garnet.test.cluster/ClusterRedirectTests.cs |
Tests read-mode redirects. |
test/cluster/Garnet.test.cluster.replication/ReplicationTests/ClusterReplicationBaseTests.cs |
Tests failover write rejection. |
libs/server/ServerConfig.cs |
Returns fixed replica policy. |
libs/server/Resp/BasicCommands.cs |
Restricts flushes to internal replay. |
libs/server/Config/RuntimeServerConfig.cs |
Updates config documentation. |
libs/server/Cluster/IClusterSession.cs |
Revises session capability API. |
libs/server/AOF/AofProcessor.cs |
Grants internal replay writes. |
libs/resources/RespCommandsDocs.json |
Corrects READWRITE summary. |
libs/cluster/Session/SlotVerification/ClusterSlotVerify.cs |
Separates read and write permissions. |
libs/cluster/Session/MigrateCommand.cs |
Updates locality argument naming. |
libs/cluster/Session/ClusterSession.cs |
Stores separate session flags. |
libs/cluster/Server/Replication/ReplicaOps/ReplicaDisklessSync.cs |
Enables diskless replay writes. |
libs/cluster/Server/Replication/ReplicaOps/ReplicaDiskbasedSync.cs |
Enables disk-based replay writes. |
libs/cluster/Server/ClusterManagerSlotState.cs |
Updates locality calls. |
libs/cluster/Server/ClusterConfig.cs |
Renames replica-read locality control. |
Review details
- Files reviewed: 20/20 changed files
- Comments generated: 1
- Review effort level: Balanced
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Mathieu Tremblay (Mathos1432)
approved these changes
Sep 9, 2026
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.
Description
Aligns Garnet's cluster
READONLYandREADWRITEbehavior with Redis semantics:READONLYenables replica-local reads for slots owned by its primary, andREADWRITErestores default redirection.FLUSHDBandFLUSHALLhandling.CONFIG GET slave-read-onlyreports the fixed replica write policy asyes.READONLYafter connect and reconnect so existing replica-local validation remains explicit and stable.Fixes #2086
Fixes #2087