apache/cassandra · error · ConfigurationException
accord.journal_directory must not be the same as the commitl
Error message
accord.journal_directory must not be the same as the commitlog_directory
What it means
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.
Source
Thrown at src/java/org/apache/cassandra/config/DatabaseDescriptor.java:922
{
if (conf.local_system_data_file_directory.equals(conf.commitlog_directory))
throw new ConfigurationException("local_system_data_file_directory must not be the same as the commitlog_directory", false);
if (conf.local_system_data_file_directory.equals(conf.accord.journal_directory))
throw new ConfigurationException("local_system_data_file_directory must not be the same as the accord.journal_directory", false);
if (conf.local_system_data_file_directory.equals(conf.saved_caches_directory))
throw new ConfigurationException("local_system_data_file_directory must not be the same as the saved_caches_directory", false);
if (conf.local_system_data_file_directory.equals(conf.hints_directory))
throw new ConfigurationException("local_system_data_file_directory must not be the same as the hints_directory", false);
long freeBytes = tryGetSpace(conf.local_system_data_file_directory, FileStore::getUnallocatedSpace);
if (freeBytes < ONE_GIB)
logger.warn("Only {} free in the system data volume. Consider adding more capacity or removing obsolete snapshots",
FBUtilities.prettyPrintMemory(freeBytes));
}
if (conf.commitlog_directory.equals(conf.accord.journal_directory))
throw new ConfigurationException("accord.journal_directory must not be the same as the commitlog_directory", false);
if (conf.commitlog_directory.equals(conf.hints_directory))
throw new ConfigurationException("hints_directory must not be the same as the commitlog_directory", false);
if (conf.commitlog_directory.equals(conf.saved_caches_directory))
throw new ConfigurationException("saved_caches_directory must not be the same as the commitlog_directory", false);
if (conf.accord.journal_directory.equals(conf.hints_directory))
throw new ConfigurationException("hints_directory must not be the same as the accord.journal_directory", false);
if (conf.accord.journal_directory.equals(conf.saved_caches_directory))
throw new ConfigurationException("saved_caches_directory must not be the same as the accord.journal_directory", false);
if (conf.hints_directory.equals(conf.saved_caches_directory))
throw new ConfigurationException("saved_caches_directory must not be the same as the hints_directory", false);
initializeBackgroundWriteDiskAccessMode();
if (conf.memtable_flush_writers == 0)
{
conf.memtable_flush_writers = conf.data_file_directories.length == 1 ? 2 : 1;View on GitHub (pinned to 88fd0f6a0e)
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.
Example fix
// before (cassandra.yaml) commitlog_directory: /wal accord: journal_directory: /wal // after commitlog_directory: /wal/commitlog accord: journal_directory: /wal/accord_journal
Defensive patterns
Strategy: validation
Validate before calling
if (cfg.accord != null && cfg.accord.journal_directory != null && cfg.accord.journal_directory.equals(cfg.commitlog_directory))
throw new IllegalArgumentException("accord.journal_directory must differ from commitlog_directory"); Type guard
boolean dirsDistinct(String a, String b) { return a == null || b == null || !new File(a).getAbsolutePath().equals(new File(b).getAbsolutePath()); } Try / catch
try { DatabaseDescriptor.applyAll(cfg); } catch (ConfigurationException e) { logger.error("Directory collision: {}", e.getMessage()); System.exit(1); } Prevention
- 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
When it happens
Trigger: Set accord.journal_directory equal to commitlog_directory in cassandra.yaml and start the node; check executes during applySimpleConfig (toolInitialization/applyAll).
Common situations: Operators enabling Accord who point its journal at the existing commitlog mount; automated provisioning that reuses one 'wal' volume path for both keys.
Understand the failure class
Background: Conflicting config options: "cannot be used together" — configuration validation errors across open-source libraries — this error's family across 162 libraries.
Related errors
- hints_directory must not be the same as the accord.journal_d
- saved_caches_directory must not be the same as the accord.jo
- local_system_data_file_directory must not be the same as the
- local_system_data_file_directory must not be the same as the
- local_system_data_file_directory must not be the same as the
AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10).
Data as JSON: /api/errors/33f6116c18d1fd5c.
Report an issue: GitHub.