{"record":{"id":"ce95cba2f36621ff","repo":"apache/cassandra","slug":"not-running-paxos-repair-for-topology-change-becau-ce95cb","errorCode":null,"errorMessage":"Not running paxos repair for topology change because there are no ranges to repair","messagePattern":"Not running paxos repair for topology change because there are no ranges to repair","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"src/java/org/apache/cassandra/service/ActiveRepairService.java","lineNumber":1198,"sourceCode":"        List<Future<?>> futures = new ArrayList<>();\n\n        for (Supplier<Future<?>> futureSupplier : work)\n            futures.add(futureSupplier.get());\n\n        return FutureCombiner.allOf(futures);\n    }\n\n    public List<Supplier<Future<?>>> repairPaxosForTopologyChangeAsync(String ksName, Collection<Range<Token>> ranges, String reason)\n    {\n        if (!paxosRepairEnabled())\n        {\n            logger.warn(\"Not running paxos repair for topology change because paxos repair has been disabled\");\n            return Collections.emptyList();\n        }\n\n        if (ranges.isEmpty())\n        {\n            logger.warn(\"Not running paxos repair for topology change because there are no ranges to repair\");\n            return Collections.emptyList();\n        }\n        ClusterMetadata metadata = ClusterMetadata.current();\n        List<TableMetadata> tables = Lists.newArrayList(metadata.schema.getKeyspaces().getNullable(ksName).tables);\n        List<Supplier<Future<?>>> futures = new ArrayList<>(ranges.size() * tables.size());\n        Keyspace keyspace = Keyspace.open(ksName);\n\n        for (Range<Token> range: ranges)\n        {\n            for (TableMetadata table : tables)\n            {\n\n                ReplicationParams replication = keyspace.getMetadata().params.replication;\n                // Special case meta keyspace as it uses a custom partitioner/tokens, but the paxos table and repairs\n                // are based on the system partitioner\n                EndpointsForRange endpoints = replication.isMeta()\n                                              ? ClusterMetadata.current().fullCMSMembersAsReplicas()\n                                              : ClusterMetadata.current().placement(replication).reads.forRange(range).get();","sourceCodeStart":1180,"sourceCodeEnd":1216,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/service/ActiveRepairService.java#L1180-L1216","documentation":"repairPaxosForTopologyChangeAsync checks that there are actual token ranges to repair for the given keyspace before scheduling Paxos repairs. When the ranges collection is empty, it warns and returns an empty list - nothing to repair, which may indicate the keyspace has no data or the caller passed no ranges.","triggerScenarios":"Calling repairPaxosForTopologyChangeAsync(ksName, ranges, reason) with ranges.isEmpty() true - e.g. topology change operation computed no owned ranges for the keyspace, or keyspace has no tables/ranges owned.","commonSituations":"Decommission/move on a keyspace with no replicas on this node; programmatic callers passing an empty range set; keyspace name typo yielding no ranges.","solutions":["Verify the keyspace name and its replication strategy (does it own any ranges here?).","Check the caller that computed the ranges (topology change logic) to confirm the empty set is expected.","If the keyspace should own ranges, inspect cluster metadata (nodetool describering) to see token ownership."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// check keyspace owns ranges before requesting paxos repair\nList<Range<Token>> ranges = StorageService.instance.getLocalRanges(ksName);\nif (ranges == null || ranges.isEmpty())\n    logger.info(\"Keyspace {} owns no local ranges; skipping paxos repair\", ksName);","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Double-check keyspace names in scripted topology operations (typos yield empty ranges).","Confirm replication factor and token ownership with nodetool describering before moves.","Treat the empty-ranges warning as a signal to verify the caller's range computation."],"tags":["paxos","repair","topology-change","token-ranges"],"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-14T16:17:12.679Z"}