Skip to content

Throw exception when AofSizeLimit is set with AOF disabled#1721

Merged
vazois merged 6 commits into
devfrom
vazois/fix-aof-flags
Apr 22, 2026
Merged

Throw exception when AofSizeLimit is set with AOF disabled#1721
vazois merged 6 commits into
devfrom
vazois/fix-aof-flags

Conversation

@vazois

@vazois vazois commented Apr 21, 2026

Copy link
Copy Markdown
Contributor

Adds a validation check in Options to throw an exception if AofSizeLimit is configured while AOF is disabled, preventing misconfiguration.

Copilot AI review requested due to automatic review settings April 21, 2026 19:43

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

Adds a runtime configuration validation to prevent users from setting AofSizeLimit when AOF is disabled, avoiding a silent/no-op (or misleading) configuration.

Changes:

  • Added an Options.GetServerOptions() validation that throws when AofSizeLimit is configured while EnableAOF is false.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread libs/host/Configuration/Options.cs
vazois and others added 2 commits April 21, 2026 18:15
Add unit test verifying that GetServerOptions() throws when
--aof-size-limit is set without --aof, and succeeds when both
are provided together.

Co-authored-by: Copilot <[email protected]>
Comment thread libs/host/Configuration/Options.cs Outdated
@vazois vazois merged commit f5d7990 into dev Apr 22, 2026
21 of 23 checks passed
@vazois vazois deleted the vazois/fix-aof-flags branch April 22, 2026 22:58
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 22, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants