Remove EnableFastCommit option (always enabled)#1829
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR removes the EnableFastCommit server option and simplifies the AOF/replication/recovery codepaths by making FastCommit mode always enabled for TsavoriteLog-based AOF.
Changes:
- Removes
EnableFastCommitfrom configuration surfaces (CLI options, defaults, server options) and related validation/guards. - Forces
TsavoriteLogSettings.FastCommitMode = trueand removes non-fast-commit branches in cluster replication/sync/recovery/truncation flows. - Updates test utilities and cluster test contexts to drop the
fastCommitparameter/argument and removes associated test branching.
Reviewed changes
Copilot reviewed 21 out of 21 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| website/docs/getting-started/configuration.md | Removes the EnableFastCommit configuration entry from docs. |
| test/standalone/Garnet.test/TestUtils.cs | Drops fastCommit parameter plumbing from test server/cluster helpers. |
| test/Garnet.fuzz/Targets/GarnetEndToEnd.cs | Removes EnableFastCommit from fuzz target server options. |
| test/cluster/Garnet.test.cluster/ClusterTestContext.cs | Removes FastCommit parameter from cluster test context APIs and calls. |
| test/cluster/Garnet.test.cluster/ClusterManagementTests.cs | Removes FastCommit argument from cluster management test setup. |
| test/cluster/Garnet.test.cluster.replication/ReplicationTests/ClusterReplicationBaseTests.cs | Removes fast-commit toggling from replication tests; exercises the always-fast-commit behavior. |
| libs/server/StoreWrapper.cs | Simplifies commit background task behavior by skipping commits on replicas unconditionally. |
| libs/server/Servers/GarnetServerOptions.cs | Removes EnableFastCommit field; hardcodes FastCommitMode = true and always applies throttle freq. |
| libs/server/Databases/DatabaseManagerBase.cs | Simplifies compaction-time AOF commit logic (no replica commit path). |
| libs/server/AOF/Recover/RecoverLogDriver.cs | Removes non-fast-commit guard/exception for fast-commit metadata records during replay. |
| libs/server/AOF/GarnetLog.cs | Removes assertion that sharded-log requires FastCommit option. |
| libs/host/defaults.conf | Removes default config entry for EnableFastCommit. |
| libs/host/Configuration/Options.cs | Removes CLI option parsing/mapping/validation for --fast-commit. |
| libs/cluster/Server/Replication/ReplicationHistoryManager.cs | Removes non-fast-commit failover commit/wait path. |
| libs/cluster/Server/Replication/ReplicaOps/ReplicaDisklessSync.cs | Removes non-fast-commit commit/wait before replay reset. |
| libs/cluster/Server/Replication/ReplicaOps/ReplicaDiskbasedSync.cs | Removes non-fast-commit commit/wait before replay reset. |
| libs/cluster/Server/Replication/ReplicaOps/AOFReplay/ReplicaReplayTask.cs | Removes non-fast-commit guard/exception when receiving fast-commit metadata records. |
| libs/cluster/Server/Replication/ReplicaOps/AOFReplay/ReplicaReplaySession.cs | Always enqueues replica stream records with noCommit: true (fast-commit path). |
| libs/cluster/Server/Replication/ReplicaOps/AOFReplay/ReplicaReplayDriver.cs | Removes non-fast-commit guard/exception on fast-commit metadata records. |
| libs/cluster/Server/ClusterProvider.cs | Removes non-fast-commit commit after AOF truncation. |
| benchmark/Resp.benchmark/OfflineBench/AOFBench/AofGen.cs | Removes EnableFastCommit from benchmark AOF server options. |
4787234 to
de4647a
Compare
badrishc
approved these changes
May 27, 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.
Summary
Remove the
EnableFastCommitserver option and make the codebase always operate in FastCommit mode.Changes
EnableFastCommitfield fromGarnetServerOptions,Options, anddefaults.confFastCommitMode = truein TsavoriteLog settings!EnableFastCommit(manual commits in replica sync, failover, recovery, cluster truncation)StoreWrapperandDatabaseManagerBasefastCommitparameter from test utilities and cluster test contextsMotivation
EnableFastCommithas defaulted totrueeverywhere (server, tests, benchmarks) and the non-fast-commit path was effectively dead code. Removing it simplifies the AOF/replication logic and eliminates a configuration footgun.