apache/cassandra · critical · ConfigurationException
Group sync specified, but commitlog_sync_period found. Only
Error message
Group sync specified, but commitlog_sync_period found. Only specify commitlog_sync_group_window when using group sync
What it means
Group commitlog sync is configured with commitlog_sync_group_window_in_ms, while periodic sync uses commitlog_sync_period_in_ms. When commitlog_sync is group, applySimpleConfig rejects any non-zero commitlog_sync_period because the two parameters are mutually exclusive and an active period value indicates stale or conflicting config.
Source
Thrown at src/java/org/apache/cassandra/config/DatabaseDescriptor.java:657
}
if (conf.commitlog_sync == CommitLogSync.batch)
{
if (conf.commitlog_sync_period.toMilliseconds() != 0)
{
throw new ConfigurationException("Batch sync specified, but commitlog_sync_period found.", false);
}
logger.debug("Syncing log with batch mode");
}
else if (conf.commitlog_sync == CommitLogSync.group)
{
if (conf.commitlog_sync_group_window.toMilliseconds() == 0)
{
throw new ConfigurationException("Missing value for commitlog_sync_group_window.", false);
}
else if (conf.commitlog_sync_period.toMilliseconds() != 0)
{
throw new ConfigurationException("Group sync specified, but commitlog_sync_period found. Only specify commitlog_sync_group_window when using group sync", false);
}
logger.debug("Syncing log with a group window of {}", conf.commitlog_sync_period.toString());
}
else
{
if (conf.commitlog_sync_period.toMilliseconds() == 0)
{
throw new ConfigurationException("Missing value for commitlog_sync_period.", false);
}
logger.debug("Syncing log with a period of {}", conf.commitlog_sync_period.toString());
}
if (conf.accord.journal.flushPeriod == null)
{
conf.accord.journal.flushPeriod = conf.commitlog_sync_period;
if (conf.accord.journal.flushMode == PERIODIC && conf.commitlog_sync_period.toMilliseconds() == 0)
{
logger.warn("Accord journal is configured in periodic mode, while Cassandra commit log is configured in {} mode", conf.commitlog_sync);View on GitHub (pinned to 88fd0f6a0e)
Solutions
- Remove or comment out `commitlog_sync_period_in_ms` from cassandra.yaml when commitlog_sync is group.
- Keep `commitlog_sync_group_window_in_ms` set to the intended window (e.g. 1000ms).
- If you actually want periodic sync, change commitlog_sync to periodic instead and delete the group window.
Example fix
// before (cassandra.yaml) commitlog_sync: group commitlog_sync_group_window_in_ms: 1000 commitlog_sync_period_in_ms: 10000 // after (cassandra.yaml) commitlog_sync: group commitlog_sync_group_window_in_ms: 1000
Defensive patterns
Strategy: validation
Validate before calling
// Java, before toolInitialization()
var raw = Config.getRawConfig();
if (raw != null && raw.commitlog_sync == CommitLogSync.group
&& raw.commitlog_sync_period != null && raw.commitlog_sync_period.toMilliseconds() != 0)
throw new IllegalArgumentException("Remove commitlog_sync_period_in_ms when commitlog_sync=group"); Prevention
- Comment out (don't just override) mutually exclusive commitlog keys when switching sync modes.
- Add a config lint step that rejects commitlog_sync_period_in_ms alongside commitlog_sync: group.
- Document which keys belong to which sync mode in your ops runbook.
When it happens
Trigger: cassandra.yaml contains `commitlog_sync: group` plus a non-zero `commitlog_sync_period_in_ms` (typically left over from switching away from periodic sync), hitting DatabaseDescriptor.applySimpleConfig during toolInitialization/applyAll.
Common situations: Flipping commitlog_sync back to group (or to periodic and then back) without removing the other parameter; merged/partially reverted config files; copy-pasting tuning snippets from both sync modes.
Understand the failure class
Background: Conflicting config options: "cannot be used together" — configuration validation errors across open-source libraries — this error's family across 162 libraries.
Related errors
- Missing required directive CommitLogSync
- Batch sync specified, but commitlog_sync_period found.
- Missing value for commitlog_sync_group_window.
- Missing value for commitlog_sync_period.
- Configured ${configName} "${intf}" could not be found
AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10).
Data as JSON: /api/errors/6060e1ae4a7e9cd6.
Report an issue: GitHub.