{"record":{"id":"5e788073aaeffecb","repo":"apache/cassandra","slug":"addresses-differ","errorCode":null,"errorMessage":"Addresses differ: {} != {}","messagePattern":"Addresses differ: (.+?) != (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"src/java/org/apache/cassandra/tcm/membership/Directory.java","lineNumber":935,"sourceCode":"            dumpDiff(logger, states, other.states);\n        }\n        if (!Objects.equals(endpointsByDC, other.endpointsByDC))\n        {\n            logger.warn(\"Endpoints by dc differ: {} != {}\", endpointsByDC, other.endpointsByDC);\n            dumpDiff(logger, endpointsByDC.asMap(), other.endpointsByDC.asMap());\n        }\n        if (!Objects.equals(racksByDC, other.racksByDC))\n        {\n            logger.warn(\"Racks by dc differ: {} != {}\", racksByDC, other.racksByDC);\n        }\n        if (!Objects.equals(versions, other.versions))\n        {\n            logger.warn(\"Versions differ: {} != {}\", versions, other.versions);\n            dumpDiff(logger, versions, other.versions);\n        }\n        if (!Objects.equals(addresses, other.addresses))\n        {\n            logger.warn(\"Addresses differ: {} != {}\", addresses, other.addresses);\n            dumpDiff(logger, addresses, other.addresses);\n        }\n    }\n\n    public static <K, V> void dumpDiff(Logger logger, Map<K, V> l, Map<K, V> r)\n    {\n        for (K k : Sets.intersection(l.keySet(), r.keySet()))\n        {\n            V lv = l.get(k);\n            V rv = r.get(k);\n            if (!Objects.equals(lv, rv))\n                logger.warn(\"Values for key {} differ: {} != {}\", k, lv, rv);\n        }\n        for (K k : Sets.difference(l.keySet(), r.keySet()))\n            logger.warn(\"Value for key {} is only present in the left set: {}\", k, l.get(k));\n        for (K k : Sets.difference(r.keySet(), l.keySet()))\n            logger.warn(\"Value for key {} is only present in the right set: {}\", k, r.get(k));\n","sourceCodeStart":917,"sourceCodeEnd":953,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/tcm/membership/Directory.java#L917-L953","documentation":"WARN log from Directory.dumpDiff(Directory) indicating the addresses maps (NodeId to InetAddress) differ between two Directory snapshots. Divergent addresses mean one view maps a node ID to a different IP, or knows an address the other does not — often a symptom of node replacement or a peers-map divergence. Diagnostic output, not an exception.","triggerScenarios":"dumpDiff(other) when Objects.equals(addresses, other.addresses) is false; commonly after a node was replaced (new IP, same logical node) in one view, or an address change was committed but not yet replicated.","commonSituations":"Replacement of a failed node with a new IP while another member still holds the old address; snapshots compared across a replace operation; incorrect broadcast_address configuration causing address registration mismatches.","solutions":["Complete or replay the Replace transformation so both views record the new address for the node ID","Replay missed cluster metadata log entries on the stale node","Check broadcast_address/broadcast_address settings are correct on each node so registration addresses match expectations","Restart the diverging node to resync cluster metadata from the CMS"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Confirm replacement operations are fully committed before diffing addresses\nif (dirA.addresses().entrySet().stream()\n        .allMatch(e -> e.getValue().equals(dirB.addresses().get(e.getKey()))))\n    // addresses agree; nothing to diff\n    return;","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always perform node replacements via the Replace transformation so addresses update atomically in cluster metadata","Validate broadcast_address configuration on every node","Replay metadata on nodes that missed an address change","Wait for metadata convergence after any IP change before comparing directories"],"tags":["cassandra","tcm","network","diagnostics"],"backgroundTag":"internal-invariant-violation","analyzedSha":"88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1","analyzedAt":"2026-09-10T07:29:22.284Z","contentChangedAt":"2026-09-10T07:29:22.284Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}