apache/cassandra · warning
Value for key {} is only present in the right set: {}
Error message
Value for key {} is only present in the right set: {} What it means
Companion warning of Directory.dumpDiff: it logs keys that exist only in the right-hand directory, i.e. the compared Directory knows about nodes/mappings that the local directory lacks. Like its left-set sibling it is diagnostic logging emitted when two directories that should match do not, typically during CMS initialization verification.
Source
Thrown at src/java/org/apache/cassandra/tcm/membership/Directory.java:952
{
logger.warn("Addresses differ: {} != {}", addresses, other.addresses);
dumpDiff(logger, addresses, other.addresses);
}
}
public static <K, V> void dumpDiff(Logger logger, Map<K, V> l, Map<K, V> r)
{
for (K k : Sets.intersection(l.keySet(), r.keySet()))
{
V lv = l.get(k);
V rv = r.get(k);
if (!Objects.equals(lv, rv))
logger.warn("Values for key {} differ: {} != {}", k, lv, rv);
}
for (K k : Sets.difference(l.keySet(), r.keySet()))
logger.warn("Value for key {} is only present in the left set: {}", k, l.get(k));
for (K k : Sets.difference(r.keySet(), l.keySet()))
logger.warn("Value for key {} is only present in the right set: {}", k, r.get(k));
}
public static class RemovedNode implements Comparable<RemovedNode>
{
public final Epoch removedIn;
public final NodeId id;
public final InetAddressAndPort endpoint;
public RemovedNode(Epoch removedIn, NodeId id, InetAddressAndPort endpoint)
{
this.removedIn = removedIn;
this.id = id;
this.endpoint = endpoint;
}
public boolean equals(Object object)
{View on GitHub (pinned to 88fd0f6a0e)
Solutions
- Verify network connectivity and let the CMS replicate metadata to the lagging node, then retry the operation
- Compare the logged entries against nodetool status / cluster membership to find which nodes the local directory is missing
- If a node is genuinely gone, complete its decommission so the extra directory entries are removed
Defensive patterns
Strategy: validation
Validate before calling
if (!expectedDirectory.equals(ClusterMetadata.current().directory)) {
expectedDirectory.dumpDiff(ClusterMetadata.current().directory);
throw new IllegalStateException("Local metadata is behind; resync before proceeding");
} Prevention
- Ensure the CMS has fully replicated to all nodes before comparing directories
- Never compare metadata against a node that was offline during recent membership changes
- Treat extra directory entries as signs of incomplete decommissions and clean them up
When it happens
Trigger: Directory.dumpDiff(this, other) is called after a failed equals() between two Directory instances and the right directory contains entries absent from the left, e.g. the local node's directory is missing entries the initiator has.
Common situations: A joining node has not yet learned about recently added cluster members; the initiator migrated the cluster while this node was down; gossip/TCM replication lag or a partition left the local metadata behind.
Understand the failure class
Background: Schema validation failed / invalid input schema: payload rejected because its shape doesn't match the expected schema — this error's family across 28 libraries.
Related errors
- Value for key {} is only present in the left set: {}
- Initiator directory different from our
- In progress sequences differ: {} != {}
- Extensions differ: {} != {}
- CMS Membership differ: {} != {}
AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10).
Data as JSON: /api/errors/2f920755a3e2ed46.
Report an issue: GitHub.