apache/cassandra · error · IllegalArgumentException

Unable to commit rack changes: {r}

Error message

Unable to commit rack changes: {r}

What it means

Thrown by StorageService when committing a rack/topology transformation via ReactiveTransformationResult.commit fails; the failure reason r is appended. It wraps an exception caught while persisting the DC/rack placement change.

Source

Thrown at src/java/org/apache/cassandra/service/StorageService.java:5863

        return DatabaseDescriptor.getPaxosRepairRaceWait();
    }

    public void alterTopology(String changes)
    {
        Map<NodeId, Location> updates = AlterTopology.parseArgs(changes, ClusterMetadata.current().directory);
        logger.info("Received request to modify rack assignments. Proposed changes: {}", updates);
        if (updates.isEmpty())
            return;

        AlterTopology transform = new AlterTopology(updates, ClusterMetadataService.instance().placementProvider());
        ClusterMetadataService.instance()
                              .commit(transform,
                                      m -> {
                                          logger.info("Rack changes committed successfully");
                                          return m;
                                      },
                                      (c, r) -> {
                                          throw new IllegalArgumentException("Unable to commit rack changes: " + r);
                                      });
    }

    @Override
    public List<String> getTablesForKeyspace(String keyspace)
    {
        return Keyspace.open(keyspace).getColumnFamilyStores().stream().map(cfs -> cfs.name).collect(Collectors.toList());
    }

    @Override
    public void validateAndRepairPeersMetadata()
    {
        SystemPeersValidator.validateAndRepair(ClusterMetadata.current());
    }

    @Override
    public List<String> mutateSSTableRepairedState(boolean repaired, boolean preview, String keyspace, List<String> tableNames)
    {

View on GitHub (pinned to 88fd0f6a0e)

Solutions

  1. Read the appended reason and fix the underlying transformation failure it reports.
  2. Retry the rack change once the cluster reaches schema/ownership agreement and no other topology operations are in flight.
  3. Check logs around the commit for the original exception and validate the proposed topology before reapplying.
Defensive patterns

Strategy: retry

Validate before calling

// Ensure no other topology operations are in flight
// nodetool netstats / compactionstats clean; cluster at schema agreement

Try / catch

try { rackChangeApi.commit(); }
catch (IllegalArgumentException e) { logger.warn("rack commit failed: {}", e.getMessage()); /* inspect reason, resolve conflict, retry */ }

Prevention

When it happens

Trigger: Calling the rack-change API (e.g. moveNode/assassinate-era topology transforms or RackInferringSnitch updates) where the underlying transformation commit encounters a conflict or internal error, so the failure callback rethrows IllegalArgumentException.

Common situations: Concurrent topology changes conflicting with each other; incoherent cluster state during DC/rack migration; node leaving/joining while the rack change is applied.

Understand the failure class

Background: "Invalid state transition" errors: "status must be X, actually Y", "already rejected/charging/uninstalled", "cannot ... while running" — what they mean when a library rejects your call — this error's family across 31 libraries.

Related errors


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