{"record":{"id":"1ae55854ce3af3ae","repo":"apache/cassandra","slug":"local-system-data-file-directory-must-not-be-the-s","errorCode":null,"errorMessage":"local_system_data_file_directory must not be the same as any data_file_directories","messagePattern":"local_system_data_file_directory must not be the same as any data_file_directories","errorType":"validation","errorClass":"ConfigurationException","httpStatus":null,"severity":"critical","filePath":"src/java/org/apache/cassandra/config/DatabaseDescriptor.java","lineNumber":887,"sourceCode":"        }\n\n        if (conf.saved_caches_directory == null)\n        {\n            conf.saved_caches_directory = storagedirFor(\"saved_caches\");\n        }\n        if (conf.data_file_directories == null || conf.data_file_directories.length == 0)\n        {\n            conf.data_file_directories = new String[]{ storagedir(\"data_file_directories\") + File.pathSeparator() + \"data\" };\n        }\n\n        long dataFreeBytes = 0;\n        /* data file and commit log directories. they get created later, when they're needed. */\n        for (String datadir : conf.data_file_directories)\n        {\n            if (datadir == null)\n                throw new ConfigurationException(\"data_file_directories must not contain empty entry\", false);\n            if (datadir.equals(conf.local_system_data_file_directory))\n                throw new ConfigurationException(\"local_system_data_file_directory must not be the same as any data_file_directories\", false);\n            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))","sourceCodeStart":869,"sourceCodeEnd":905,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/config/DatabaseDescriptor.java#L869-L905","documentation":"Cassandra requires conf.local_system_data_file_directory (where local system keyspaces' data is stored) to differ from every entry in data_file_directories. applySimpleConfig throws ConfigurationException when they collide, preventing ambiguous data placement between the local system directory and regular data directories.","triggerScenarios":"Setting local_system_data_file_directory in cassandra.yaml to a path equal (string equality) to any data_file_directories entry; checked during applySimpleConfig on every startup.","commonSituations":"Operators consolidating directories on small disks and pointing local system data at the main data dir; config generators defaulting both to the same path.","solutions":["Choose a distinct path for local_system_data_file_directory (e.g. /var/lib/cassandra/local_system)","Remove local_system_data_file_directory entirely if separation is not desired (it is optional)","Check each data_file_directories entry for exact string equality against the local system directory"],"exampleFix":"# before (cassandra.yaml)\ndata_file_directories:\n  - /var/lib/cassandra/data\nlocal_system_data_file_directory: /var/lib/cassandra/data\n# after (cassandra.yaml)\ndata_file_directories:\n  - /var/lib/cassandra/data\nlocal_system_data_file_directory: /var/lib/cassandra/local_system","handlingStrategy":"validation","validationCode":"String local = (String) yaml.get(\"local_system_data_file_directory\");\nList<String> dirs = (List<String>) yaml.get(\"data_file_directories\");\nif (local != null && dirs != null && dirs.contains(local))\n    throw new IllegalArgumentException(\"local_system_data_file_directory must differ from all data_file_directories\");","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(\"directory collision with data_file_directories\", e);\n    throw e;\n}","preventionTips":["Give local_system_data_file_directory its own dedicated path","Add a startup pre-check asserting all configured directories are pairwise distinct","Leave the option unset unless per-keyspace local-system separation is needed"],"tags":["cassandra","configuration","directories"],"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"}