{"record":{"id":"a09e2416dc738aeb","repo":"apache/cassandra","slug":"missing-value-for-commitlog-sync-group-window","errorCode":null,"errorMessage":"Missing value for commitlog_sync_group_window.","messagePattern":"Missing value for commitlog_sync_group_window\\.","errorType":"validation","errorClass":"ConfigurationException","httpStatus":null,"severity":"critical","filePath":"src/java/org/apache/cassandra/config/DatabaseDescriptor.java","lineNumber":653,"sourceCode":"\n        if (conf.commitlog_sync == null)\n        {\n            throw new ConfigurationException(\"Missing required directive CommitLogSync\", false);\n        }\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        {","sourceCodeStart":635,"sourceCodeEnd":671,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/config/DatabaseDescriptor.java#L635-L671","documentation":"When commitlog_sync is set to CommitLogSync.group, Cassandra requires an explicit commitlog_sync_group_window duration; the config loader defaults the window to 0 milliseconds when unset. DatabaseDescriptor.applySimpleConfig treats a 0ms window as 'not configured' and fails fast at startup with this ConfigurationException rather than running with a zero-length group commit window, which would break group-commit batching.","triggerScenarios":"Setting `commitlog_sync: group` in cassandra.yaml while omitting `commitlog_sync_group_window_in_ms` (or setting it to 0), then calling DatabaseDescriptor.toolInitialization()/applyAll (i.e., any node startup).","commonSituations":"Operators switching from periodic/commit sync to group sync following old tuning guides that predate the group window parameter; hand-edited cassandra.yaml copies where the window line was dropped; templated configs that only substitute the sync mode.","solutions":["Add `commitlog_sync_group_window_in_ms: 1000` (a sensible value, e.g. 100-2000ms) to cassandra.yaml next to commitlog_sync: group.","Remove the commitlog_sync override so the default (periodic) sync is used if you don't need group sync.","Set a non-zero commitlog_sync_group_window_in_ms in the JVM system properties / Config used for embedded or test initialization before calling toolInitialization()."],"exampleFix":"// before (cassandra.yaml)\ncommitlog_sync: group\n// after (cassandra.yaml)\ncommitlog_sync: group\ncommitlog_sync_group_window_in_ms: 1000","handlingStrategy":"validation","validationCode":"// Java, before toolInitialization()\nif (Config.getRawConfig() != null && Config.getRawConfig().commitlog_sync == CommitLogSync.group\n    && (Config.getRawConfig().commitlog_sync_group_window == null\n        || Config.getRawConfig().commitlog_sync_group_window.toMilliseconds() == 0))\n    throw new IllegalArgumentException(\"commitlog_sync=group requires a non-zero commitlog_sync_group_window_in_ms\");","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always ship a complete cassandra.yaml validated by `cassandra -f` or a startup smoke test in CI before deploy.","When changing commitlog_sync, review every commitlog_sync_* sibling key at the same time.","Keep config in version control and diff against the shipped cassandra.yaml on upgrade."],"tags":["config","commitlog","startup","validation"],"backgroundTag":"missing-required-config-field","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"}