{"record":{"id":"dfea1a0069d17a53","repo":"apache/cassandra","slug":"could-not-merge-node-to-gossip","errorCode":null,"errorMessage":"Could not merge node {} to gossip","messagePattern":"Could not merge node (.+?) to gossip","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"src/java/org/apache/cassandra/gms/Gossiper.java","lineNumber":2411,"sourceCode":"                            newValue = oldValue;\n                    }\n                    if (newValue != null)\n                    {\n                        // note that version needs to be > -1 here, otherwise Gossiper#sendAll on generation change doesn't send it\n                        if (!isLocal)\n                            newValue = unsafeMakeVersionedValue(newValue.value, oldValue == null ? 0 : oldValue.version);\n                        newStates.put(appState, newValue);\n                    }\n                }\n                HeartBeatState heartBeatState = new HeartBeatState(epstate.getHeartBeatState().getGeneration(), isLocal ? VersionGenerator.getNextVersion() : 0);\n                EndpointState newepstate = new EndpointState(heartBeatState, newStates);\n                unsafeUpdateEpStates(endpoint, newepstate);\n                logger.debug(\"Updated epstates for {}: {}\", endpoint, newepstate);\n            });\n        }\n        catch (Exception e)\n        {\n            logger.warn(\"Could not merge node {} to gossip\", nodeId, e);\n        }\n        finally\n        {\n            taskLock.unlock();\n        }\n    }\n\n    public void triggerRoundWithCMS()\n    {\n        ClusterMetadata metadata = ClusterMetadata.current();\n        Set<InetAddressAndPort> cms = metadata.fullCMSMembers();\n        if (!cms.contains(getBroadcastAddressAndPort()))\n        {\n            logger.debug(\"Triggering gossip round with CMS {}\", metadata.epoch);\n            final List<GossipDigest> gDigests = new ArrayList<>();\n            Gossiper.instance.makeGossipDigest(gDigests);\n            GossipDigestSyn digestSynMessage = new GossipDigestSyn(getClusterName(),\n                                                                   getPartitionerName(),","sourceCodeStart":2393,"sourceCodeEnd":2429,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/gms/Gossiper.java#L2393-L2429","documentation":"When merging a node's state into gossip inside the taskLock-protected block, an unexpected exception during the merge is caught, logged with this warning and the exception, and swallowed so the lock is released and gossip continues. It indicates gossip state for that node was not updated.","triggerScenarios":"The state-merge call for a nodeId throws inside the taskLock block (e.g., serialization or state-invariant exceptions) while applying remote endpoint state updates.","commonSituations":"State mismatches after partial upgrades; concurrent gossip updates racing with node state changes; merge bugs on mixed-version clusters.","solutions":["Read the full stack trace logged with this warning to find the merge failure cause.","Verify cluster version uniformity (run nodetool version everywhere) and complete any interrupted upgrades.","Restart the affected node to re-sync gossip state from peers.","If reproducible, capture the exception and report upstream with the stack trace; check NEWS.txt for known fixes in your release."],"exampleFix":"// before: rolling upgrade with mixed acc-state formats\n// after: complete upgrade first\nnodetool version  # on every node\nnodetool drain && upgrade remaining nodes before heavy acc traffic","handlingStrategy":"try-catch","validationCode":"// ensure versions uniform before heavy state churn\nboolean uniform = clusterNodes().stream().allMatch(n -> n.getVersion().equals(LOCAL_VERSION));","typeGuard":null,"tryCatchPattern":"try { gossiper.merge(nodeId, state); } catch (Exception e) { logger.warn(\"merge failed for node {}\", nodeId, e); /* retry or resync */ }","preventionTips":["Keep cluster versions homogeneous; finish upgrades before relying on new state-merge paths.","Capture full stack traces when this warning fires and check release notes for known fixes.","Restart affected nodes to re-sync gossip state."],"tags":["cassandra","gossip","accord","state-merge"],"backgroundTag":"state-merge-failed","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"}