apache/cassandra · warning
Locked ranges differ
Error message
Locked ranges differ: {} != {} What it means
ClusterMetadata's equivalence/diff check compares this metadata against another snapshot. When lockedRanges differs, it logs 'Locked ranges differ: {} != {}' as a warning (not thrown). This diagnostic runs when validating/reconciling two ClusterMetadata views (e.g. loading from log vs. computed state) and indicates the locked-ranges component diverged between them.
Solutions
- Re-run the comparison after quiescing range-locking operations (finish active repairs) to see if the difference is transient
- Restart/realign the node's TCM state (force refresh from the current epoch)
- Check preceding 'Placements differ' / other diff warnings to characterize the divergence; report to the project if reproducible (likely a TCM bug)
- Verify all CMS members are on the same epoch and no node has a stale log
Defensive patterns
Strategy: validation
Validate before calling
// before diffing metadata, ensure no in-flight range operations
if (ClusterMetadata.current().lockedRanges.size() > 0)
logger.warn("Active range locks may cause diff mismatch; quiesce repairs first"); Prevention
- Quiesce repairs/range operations before snapshotting or diffing TCM state
- Keep all CMS members on the same epoch
- Treat repeated diff warnings as a TCM bug and report with repro
When it happens
Trigger: Replaying the TCM commit log or comparing an in-memory ClusterMetadata against a serialized/recomputed copy where lockedRanges (range locks held by operations like repairs) do not match.
Common situations: Concurrent range-locking operations (repairs/maintenance) during snapshot/replay; a bug in diffing or serialization; partial log replay after crash.
Understand the failure class
Background: "This is a bug, please report it": internal invariant violations, unreachable panics, and SNH errors explained — this error's family across 47 libraries.
Related errors
- Couldn't commit the transformation. Is the node shutting…
- Illegal state:
- Initializing with cluster metadata from
- Last modified differ
- nextId differ: !=
AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10).
Data as JSON: /api/errors/d6c789e14f8ac9bc.
Report an issue: GitHub.
Appendix: source
Thrown at src/java/org/apache/cassandra/tcm/ClusterMetadata.java:1263
}
if (!directory.equals(other.directory))
{
logger.warn("Directories differ:");
directory.dumpDiff(other.directory);
}
if (!tokenMap.equals(other.tokenMap))
{
logger.warn("Token maps differ:");
tokenMap.dumpDiff(other.tokenMap);
}
if (!placements.equals(other.placements))
{
logger.warn("Placements differ:");
placements.dumpDiff(other.placements);
}
if (!lockedRanges.equals(other.lockedRanges))
{
logger.warn("Locked ranges differ: {} != {}", lockedRanges, other.lockedRanges);
}
if (!inProgressSequences.equals(other.inProgressSequences))
{
logger.warn("In progress sequences differ: {} != {}", inProgressSequences, other.inProgressSequences);
}
if (!extensions.equals(other.extensions))
{
logger.warn("Extensions differ: {} != {}", extensions, other.extensions);
}
if (!cmsMembership.equals(other.cmsMembership))
{
logger.warn("CMS Membership differ: {} != {}", cmsMembership, other.cmsMembership);
}
}
@Override
public int hashCode()
{View on GitHub (pinned to 88fd0f6a0e)