{"record":{"id":"6060e1ae4a7e9cd6","repo":"apache/cassandra","slug":"group-sync-specified-but-commitlog-sync-period-fo","errorCode":null,"errorMessage":"Group sync specified, but commitlog_sync_period found. Only specify commitlog_sync_group_window when using group sync","messagePattern":"Group sync specified, but commitlog_sync_period found\\. Only specify commitlog_sync_group_window when using group sync","errorType":"validation","errorClass":"ConfigurationException","httpStatus":null,"severity":"critical","filePath":"src/java/org/apache/cassandra/config/DatabaseDescriptor.java","lineNumber":657,"sourceCode":"        }\n\n        if (conf.commitlog_sync == CommitLogSync.batch)\n        {\n            if (conf.commitlog_sync_period.toMilliseconds() != 0)\n            {\n                throw new ConfigurationException(\"Batch sync specified, but commitlog_sync_period found.\", false);\n            }\n            logger.debug(\"Syncing log with batch mode\");\n        }\n        else if (conf.commitlog_sync == CommitLogSync.group)\n        {\n            if (conf.commitlog_sync_group_window.toMilliseconds() == 0)\n            {\n                throw new ConfigurationException(\"Missing value for commitlog_sync_group_window.\", false);\n            }\n            else if (conf.commitlog_sync_period.toMilliseconds() != 0)\n            {\n                throw new ConfigurationException(\"Group sync specified, but commitlog_sync_period found. Only specify commitlog_sync_group_window when using group sync\", false);\n            }\n            logger.debug(\"Syncing log with a group window of {}\", conf.commitlog_sync_period.toString());\n        }\n        else\n        {\n            if (conf.commitlog_sync_period.toMilliseconds() == 0)\n            {\n                throw new ConfigurationException(\"Missing value for commitlog_sync_period.\", false);\n            }\n            logger.debug(\"Syncing log with a period of {}\", conf.commitlog_sync_period.toString());\n        }\n\n        if (conf.accord.journal.flushPeriod == null)\n        {\n            conf.accord.journal.flushPeriod = conf.commitlog_sync_period;\n            if (conf.accord.journal.flushMode == PERIODIC && conf.commitlog_sync_period.toMilliseconds() == 0)\n            {\n                logger.warn(\"Accord journal is configured in periodic mode, while Cassandra commit log is configured in {} mode\", conf.commitlog_sync);","sourceCodeStart":639,"sourceCodeEnd":675,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/config/DatabaseDescriptor.java#L639-L675","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":"// before (cassandra.yaml)\ncommitlog_sync: group\ncommitlog_sync_group_window_in_ms: 1000\ncommitlog_sync_period_in_ms: 10000\n// after (cassandra.yaml)\ncommitlog_sync: group\ncommitlog_sync_group_window_in_ms: 1000","handlingStrategy":"validation","validationCode":"// Java, before toolInitialization()\nvar raw = Config.getRawConfig();\nif (raw != null && raw.commitlog_sync == CommitLogSync.group\n    && raw.commitlog_sync_period != null && raw.commitlog_sync_period.toMilliseconds() != 0)\n    throw new IllegalArgumentException(\"Remove commitlog_sync_period_in_ms when commitlog_sync=group\");","typeGuard":null,"tryCatchPattern":null,"preventionTips":["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."],"tags":["config","commitlog","startup","conflicting-options"],"backgroundTag":"conflicting-config-options","analyzedSha":"88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1","analyzedAt":"2026-09-10T07:29:22.284Z","contentChangedAt":"2026-09-10T07:29:22.284Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}