{"record":{"id":"33f6116c18d1fd5c","repo":"apache/cassandra","slug":"accord-journal-directory-must-not-be-the-same-as-t","errorCode":null,"errorMessage":"accord.journal_directory must not be the same as the commitlog_directory","messagePattern":"accord\\.journal_directory must not be the same as the commitlog_directory","errorType":"validation","errorClass":"ConfigurationException","httpStatus":null,"severity":"error","filePath":"src/java/org/apache/cassandra/config/DatabaseDescriptor.java","lineNumber":922,"sourceCode":"        {\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))\n            throw new ConfigurationException(\"saved_caches_directory must not be the same as the accord.journal_directory\", false);\n\n        if (conf.hints_directory.equals(conf.saved_caches_directory))\n            throw new ConfigurationException(\"saved_caches_directory must not be the same as the hints_directory\", false);\n\n        initializeBackgroundWriteDiskAccessMode();\n\n        if (conf.memtable_flush_writers == 0)\n        {\n            conf.memtable_flush_writers = conf.data_file_directories.length == 1 ? 2 : 1;","sourceCodeStart":904,"sourceCodeEnd":940,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/config/DatabaseDescriptor.java#L904-L940","documentation":"DatabaseDescriptor.applySimpleConfig throws this ConfigurationException when the Accord durable journal directory is identical to the commitlog directory. The commitlog and the Accord journal are both write-ahead logs; co-locating them would contend for the same disk's write bandwidth and undermine independent durability/capacity planning.","triggerScenarios":"Set accord.journal_directory equal to commitlog_directory in cassandra.yaml and start the node; check executes during applySimpleConfig (toolInitialization/applyAll).","commonSituations":"Operators enabling Accord who point its journal at the existing commitlog mount; automated provisioning that reuses one 'wal' volume path for both keys.","solutions":["Give accord.journal_directory its own path in cassandra.yaml, ideally its own disk.","If only one disk exists, use distinct subdirectories (e.g. /wal/commitlog and /wal/accord_journal).","Re-run startup after confirming via cassandra.yaml review that no two directory keys share a value."],"exampleFix":"// before (cassandra.yaml)\ncommitlog_directory: /wal\naccord:\n  journal_directory: /wal\n// after\ncommitlog_directory: /wal/commitlog\naccord:\n  journal_directory: /wal/accord_journal","handlingStrategy":"validation","validationCode":"if (cfg.accord != null && cfg.accord.journal_directory != null && cfg.accord.journal_directory.equals(cfg.commitlog_directory))\n    throw new IllegalArgumentException(\"accord.journal_directory must differ from commitlog_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":["When enabling Accord, provision a separate journal directory (ideally a separate disk from the commitlog)","Re-run config linting after any Accord-related cassandra.yaml change","Document the required directory layout for Accord-enabled clusters"],"tags":["config","startup","directory-conflict","accord"],"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"}