apache/cassandra · critical · ConfigurationException

accord.journal_directory must not be the same as any data_fi

Error message

accord.journal_directory must not be the same as any data_file_directories

What it means

Accord's journal (transactional metadata for the Accord-based transactional features) must not share a directory with any data_file_directories. DatabaseDescriptor.applySimpleConfig throws ConfigurationException when conf.accord.journal_directory equals a data directory, refusing to start to keep Accord journal files separate from Cassandra SSTables.

Source

Thrown at src/java/org/apache/cassandra/config/DatabaseDescriptor.java:891

            conf.saved_caches_directory = storagedirFor("saved_caches");
        }
        if (conf.data_file_directories == null || conf.data_file_directories.length == 0)
        {
            conf.data_file_directories = new String[]{ storagedir("data_file_directories") + File.pathSeparator() + "data" };
        }

        long dataFreeBytes = 0;
        /* data file and commit log directories. they get created later, when they're needed. */
        for (String datadir : conf.data_file_directories)
        {
            if (datadir == null)
                throw new ConfigurationException("data_file_directories must not contain empty entry", false);
            if (datadir.equals(conf.local_system_data_file_directory))
                throw new ConfigurationException("local_system_data_file_directory must not be the same as any data_file_directories", false);
            if (datadir.equals(conf.commitlog_directory))
                throw new ConfigurationException("commitlog_directory must not be the same as any data_file_directories", false);
            if (datadir.equals(conf.accord.journal_directory))
                throw new ConfigurationException("accord.journal_directory must not be the same as any data_file_directories", false);
            if (datadir.equals(conf.hints_directory))
                throw new ConfigurationException("hints_directory must not be the same as any data_file_directories", false);
            if (datadir.equals(conf.saved_caches_directory))
                throw new ConfigurationException("saved_caches_directory must not be the same as any data_file_directories", false);

            dataFreeBytes = saturatedSum(dataFreeBytes, tryGetSpace(datadir, FileStore::getUnallocatedSpace));
        }
        if (dataFreeBytes < 64 * ONE_GIB) // 64 GB
            logger.warn("Only {} free across all data volumes. Consider adding more capacity to your cluster or removing obsolete snapshots",
                        FBUtilities.prettyPrintMemory(dataFreeBytes));

        if (conf.local_system_data_file_directory != null)
        {
            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))

View on GitHub (pinned to 88fd0f6a0e)

Solutions

  1. Set accord.journal_directory to its own distinct path (e.g. /var/lib/cassandra/accord/journal)
  2. Remove the custom override so it falls back to a distinct default if one applies
  3. Verify the rendered config with a path-uniqueness check before rollout

Example fix

# before (cassandra.yaml)
data_file_directories:
  - /var/lib/cassandra/data
accord:
  journal_directory: /var/lib/cassandra/data
# after (cassandra.yaml)
data_file_directories:
  - /var/lib/cassandra/data
accord:
  journal_directory: /var/lib/cassandra/accord/journal
Defensive patterns

Strategy: validation

Validate before calling

String journal = (String) ((Map<String,Object>) yaml.getOrDefault("accord", Map.of())).get("journal_directory");
List<String> dirs = (List<String>) yaml.get("data_file_directories");
if (journal != null && dirs != null && dirs.contains(journal))
    throw new IllegalArgumentException("accord.journal_directory must differ from all data_file_directories");

Try / catch

try {
    DatabaseDescriptor.toolInitialization();
} catch (ConfigurationException e) {
    if (e.getMessage().contains("accord.journal_directory"))
        throw new StartupConfigError("accord journal directory overlaps data directory", e);
    throw e;
}

Prevention

When it happens

Trigger: Setting accord.journal_directory in cassandra.yaml to the same path as any data_file_directories entry; checked during startup in applySimpleConfig.

Common situations: Clusters enabling Accord/transactional config where the journal directory was defaulted or copy-pasted from the data directory; operators reusing one mount for everything.

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


AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10). Data as JSON: /api/errors/dade72a5922d1cf9. Report an issue: GitHub.