{"record":{"id":"e74b9af4ad09b630","repo":"apache/cassandra","slug":"found-no-sources-for","errorCode":null,"errorMessage":"Found no sources for ","messagePattern":"Found no sources for ","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"src/java/org/apache/cassandra/tcm/sequences/Move.java","lineNumber":500,"sourceCode":"                });\n                // if we are not running with strict consistency, try to find other sources for streaming\n                if (needsRelaxedSources.get())\n                {\n                    for (Replica source : DatabaseDescriptor.getNodeProximity()\n                                                            .sortedByProximity(FBUtilities.getBroadcastAddressAndPort(),\n                                                                               oldOwners.forRange(destination.range()).get()))\n                    {\n                        if (fd.isAlive(source.endpoint()) && !source.endpoint().equals(destination.endpoint()))\n                        {\n                            if ((sources.fullSource == null && source.isFull()) ||\n                                (sources.transientSource == null && source.isTransient()))\n                                sources.addSource(source);\n                        }\n                    }\n                }\n\n                if (sources.fullSource == null && destination.isFull())\n                    throw new IllegalStateException(\"Found no sources for \"+destination);\n                sources.addToMovements(destination, movements);\n            });\n            allMovements.put(params, movements.build());\n        });\n\n        return allMovements.build();\n    }\n\n    private static class SourceHolder\n    {\n        private final IFailureDetector fd;\n        private final boolean strict;\n        private Replica fullSource;\n        private Replica transientSource;\n        private final Replica destination;\n        private final RangesByEndpoint writeAdditions;\n\n        public SourceHolder(IFailureDetector fd, Replica destination, RangesByEndpoint writeAdditions, boolean strict)","sourceCodeStart":482,"sourceCodeEnd":518,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/tcm/sequences/Move.java#L482-L518","documentation":"At the end of movementMap, if a destination is a full (owning) replica but no streaming source could be determined for it, the code throws IllegalStateException. Without a source the destination cannot receive the data it will own, so the move cannot proceed safely. This usually reflects too few live replicas or inconsistent range ownership.","triggerScenarios":"movementMap completes source selection but sources.fullSource remains null while destination.isFull() is true: no live replica holds the full range to stream from during nodetool move.","commonSituations":"Multiple nodes down in the cluster so no full replica of the range is available; RF=1 with the single replica involved in the move; repairs never run so no replica has the complete range.","solutions":["Restore availability: restart down nodes so a full replica of each moved range is live","Run nodetool repair to bring replicas up to a complete state before moving","Verify replication settings (RF per DC) give at least one other live full replica for affected ranges","If data is lost/under-replicated, consider rebuilding the node instead of moving it"],"exampleFix":"// before\n// nodetool move with only one live node holding the range\n// after\n// bring second replica up + nodetool repair, verify (nodetool describecluster / status), then nodetool move","handlingStrategy":"validation","validationCode":"boolean fullSourceExists = ranges.stream().allMatch(r -> liveReplicasHolding(r).size() >= 1);\nif (!fullSourceExists) throw new IllegalStateException(\"Refusing move: some ranges have no live full replica\");","typeGuard":null,"tryCatchPattern":"try { move.execute(); } catch (IllegalStateException e) { logger.error(\"No source for destination: {}\", e.getMessage()); rebuildOrRepairBeforeMove(); }","preventionTips":["Never run moves while multiple nodes are down","Repair before topology changes so a full replica exists per range","Avoid moving the only replica of any range (RF=1 clusters should rebuild, not move)"],"tags":["move","streaming-sources","replication","availability"],"backgroundTag":"empty-result-set","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"}