{"record":{"id":"889a3e29954d6144","repo":"apache/cassandra","slug":"local-system-data-file-directory-must-not-be-the-s-889a3e","errorCode":null,"errorMessage":"local_system_data_file_directory must not be the same as the commitlog_directory","messagePattern":"local_system_data_file_directory must not be the same as the commitlog_directory","errorType":"validation","errorClass":"ConfigurationException","httpStatus":null,"severity":"critical","filePath":"src/java/org/apache/cassandra/config/DatabaseDescriptor.java","lineNumber":906,"sourceCode":"            if (datadir.equals(conf.commitlog_directory))\n                throw new ConfigurationException(\"commitlog_directory must not be the same as any data_file_directories\", false);\n            if (datadir.equals(conf.accord.journal_directory))\n                throw new ConfigurationException(\"accord.journal_directory must not be the same as any data_file_directories\", false);\n            if (datadir.equals(conf.hints_directory))\n                throw new ConfigurationException(\"hints_directory must not be the same as any data_file_directories\", false);\n            if (datadir.equals(conf.saved_caches_directory))\n                throw new ConfigurationException(\"saved_caches_directory must not be the same as any data_file_directories\", false);\n\n            dataFreeBytes = saturatedSum(dataFreeBytes, tryGetSpace(datadir, FileStore::getUnallocatedSpace));\n        }\n        if (dataFreeBytes < 64 * ONE_GIB) // 64 GB\n            logger.warn(\"Only {} free across all data volumes. Consider adding more capacity to your cluster or removing obsolete snapshots\",\n                        FBUtilities.prettyPrintMemory(dataFreeBytes));\n\n        if (conf.local_system_data_file_directory != null)\n        {\n            if (conf.local_system_data_file_directory.equals(conf.commitlog_directory))\n                throw new ConfigurationException(\"local_system_data_file_directory must not be the same as the commitlog_directory\", false);\n            if (conf.local_system_data_file_directory.equals(conf.accord.journal_directory))\n                throw new ConfigurationException(\"local_system_data_file_directory must not be the same as the accord.journal_directory\", false);\n            if (conf.local_system_data_file_directory.equals(conf.saved_caches_directory))\n                throw new ConfigurationException(\"local_system_data_file_directory must not be the same as the saved_caches_directory\", false);\n            if (conf.local_system_data_file_directory.equals(conf.hints_directory))\n                throw new ConfigurationException(\"local_system_data_file_directory must not be the same as the hints_directory\", false);\n\n            long freeBytes = tryGetSpace(conf.local_system_data_file_directory, FileStore::getUnallocatedSpace);\n\n            if (freeBytes < ONE_GIB)\n                logger.warn(\"Only {} free in the system data volume. Consider adding more capacity or removing obsolete snapshots\",\n                            FBUtilities.prettyPrintMemory(freeBytes));\n        }\n\n        if (conf.commitlog_directory.equals(conf.accord.journal_directory))\n            throw new ConfigurationException(\"accord.journal_directory must not be the same as the commitlog_directory\", false);\n        if (conf.commitlog_directory.equals(conf.hints_directory))\n            throw new ConfigurationException(\"hints_directory must not be the same as the commitlog_directory\", false);","sourceCodeStart":888,"sourceCodeEnd":924,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/config/DatabaseDescriptor.java#L888-L924","documentation":"When conf.local_system_data_file_directory is set, it must differ from commitlog_directory (and from accord journal, saved_caches, hints directories). applySimpleConfig throws ConfigurationException if local_system_data_file_directory equals the commitlog_directory, refusing startup so local system-ks data and the write-ahead log never share a directory.","triggerScenarios":"Setting local_system_data_file_directory in cassandra.yaml to the same path as commitlog_directory (or accord.journal_directory / saved_caches_directory / hints_directory); validated during startup when the local system directory is non-null.","commonSituations":"Operators carving out a separate local-system location but accidentally reusing the commitlog path; single-disk setups where all optional directories collapse to one path; automated config generation with a shared base path.","solutions":["Set local_system_data_file_directory to its own unique path (e.g. /var/lib/cassandra/local_system)","Remove local_system_data_file_directory if per-keyspace separation is not needed (it is optional)","Uniqueness-check all directory settings (data dirs, commitlog, hints, saved_caches, accord journal, local system) before rollout"],"exampleFix":"# before (cassandra.yaml)\ncommitlog_directory: /var/lib/cassandra/commitlog\nlocal_system_data_file_directory: /var/lib/cassandra/commitlog\n# after (cassandra.yaml)\ncommitlog_directory: /var/lib/cassandra/commitlog\nlocal_system_data_file_directory: /var/lib/cassandra/local_system","handlingStrategy":"validation","validationCode":"String local = (String) yaml.get(\"local_system_data_file_directory\");\nString commitlog = (String) yaml.get(\"commitlog_directory\");\nif (local != null && local.equals(commitlog))\n    throw new IllegalArgumentException(\"local_system_data_file_directory must differ from commitlog_directory\");\n// also check accord.journal_directory, saved_caches_directory, hints_directory","typeGuard":null,"tryCatchPattern":"try {\n    DatabaseDescriptor.toolInitialization();\n} catch (ConfigurationException e) {\n    if (e.getMessage().contains(\"local_system_data_file_directory\"))\n        throw new StartupConfigError(\"local system directory overlaps commitlog/other directories\", e);\n    throw e;\n}","preventionTips":["Assign local_system_data_file_directory a path not used by any other directory","Only set the option when local-system keyspace separation is actually required","Enforce pairwise-distinct directory checks in deployment tooling"],"tags":["cassandra","configuration","directories","commitlog"],"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"}