{"record":{"id":"9330275e40a615ff","repo":"apache/cassandra","slug":"local-system-data-file-directory-must-not-be-the-s-933027","errorCode":null,"errorMessage":"local_system_data_file_directory must not be the same as the hints_directory","messagePattern":"local_system_data_file_directory must not be the same as the hints_directory","errorType":"validation","errorClass":"ConfigurationException","httpStatus":null,"severity":"error","filePath":"src/java/org/apache/cassandra/config/DatabaseDescriptor.java","lineNumber":912,"sourceCode":"            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);\n        if (conf.commitlog_directory.equals(conf.saved_caches_directory))\n            throw new ConfigurationException(\"saved_caches_directory must not be the same as the commitlog_directory\", false);\n\n        if (conf.accord.journal_directory.equals(conf.hints_directory))\n            throw new ConfigurationException(\"hints_directory must not be the same as the accord.journal_directory\", false);\n        if (conf.accord.journal_directory.equals(conf.saved_caches_directory))","sourceCodeStart":894,"sourceCodeEnd":930,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/config/DatabaseDescriptor.java#L894-L930","documentation":"DatabaseDescriptor.applySimpleConfig throws this ConfigurationException when local_system_data_file_directory equals hints_directory. Cassandra requires hints storage and local system data storage to live on different configured paths so that hint replay and system-table access are isolated and each volume's free-space check (e.g. the ONE_GIB warning) applies to a dedicated volume.","triggerScenarios":"Set cassandra.yaml local_system_data_file_directory to the same path as hints_directory and start the node; validation runs during applySimpleConfig (toolInitialization/applyAll).","commonSituations":"Hints directory reconfigured to save disk but accidentally matched to the local system data path; single-volume container deployments where every directory key was set to one mount path.","solutions":["Set hints_directory to a different path in cassandra.yaml.","Use distinct subdirectories under the same mount if only one disk is available.","Remove the explicit local_system_data_file_directory setting if you do not need a dedicated local system data volume."],"exampleFix":"// before (cassandra.yaml)\nlocal_system_data_file_directory: /data/cassandra\nhints_directory: /data/cassandra\n// after\nlocal_system_data_file_directory: /data/cassandra/local_system\nhints_directory: /data/cassandra/hints","handlingStrategy":"validation","validationCode":"if (cfg.local_system_data_file_directory != null && cfg.local_system_data_file_directory.equals(cfg.hints_directory))\n    throw new IllegalArgumentException(\"local_system_data_file_directory must differ from hints_directory\");","typeGuard":"boolean dirsDistinct(String a, String b) { return a == null || b == null || !new File(a).getAbsolutePath().equals(new File(b).getAbsolutePath()); }","tryCatchPattern":"try { DatabaseDescriptor.applyAll(cfg); } catch (ConfigurationException e) { logger.error(\"Directory collision: {}\", e.getMessage()); System.exit(1); }","preventionTips":["Give hints_directory its own subdirectory even on a single-volume deployment","Validate directory config in CI before rolling out node images","Only set local_system_data_file_directory if you actually need a dedicated local-system volume"],"tags":["config","startup","directory-conflict"],"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"}