Skip to content

Remove EnableFastCommit option (always enabled)#1829

Merged
vazois merged 4 commits into
mainfrom
vazois/deprecate-fast-commit
May 28, 2026
Merged

Remove EnableFastCommit option (always enabled)#1829
vazois merged 4 commits into
mainfrom
vazois/deprecate-fast-commit

Conversation

@vazois

@vazois vazois commented May 27, 2026

Copy link
Copy Markdown
Contributor

Summary

Remove the EnableFastCommit server option and make the codebase always operate in FastCommit mode.

Changes

  • Remove EnableFastCommit field from GarnetServerOptions, Options, and defaults.conf
  • Hardcode FastCommitMode = true in TsavoriteLog settings
  • Remove all dead-code paths gated on !EnableFastCommit (manual commits in replica sync, failover, recovery, cluster truncation)
  • Simplify commit task in StoreWrapper and DatabaseManagerBase
  • Remove fastCommit parameter from test utilities and cluster test contexts
  • Update website configuration documentation

Motivation

EnableFastCommit has defaulted to true everywhere (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.

Copilot AI review requested due to automatic review settings May 27, 2026 01:19

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 EnableFastCommit from configuration surfaces (CLI options, defaults, server options) and related validation/guards.
  • Forces TsavoriteLogSettings.FastCommitMode = true and removes non-fast-commit branches in cluster replication/sync/recovery/truncation flows.
  • Updates test utilities and cluster test contexts to drop the fastCommit parameter/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.

Comment thread libs/server/StoreWrapper.cs Outdated
@vazois vazois force-pushed the vazois/deprecate-fast-commit branch from 4787234 to de4647a Compare May 27, 2026 17:31
@vazois vazois merged commit b1077c2 into main May 28, 2026
137 checks passed
@vazois vazois deleted the vazois/deprecate-fast-commit branch May 28, 2026 03:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants