{"record":{"id":"3ae2f2647cdae1bf","repo":"apache/beam","slug":"rcsp-closestream-has-tokens-that-don-t-cover-the-entire","errorCode":null,"errorMessage":"RCSP {}: CloseStream has tokens {} that don't cover the entire keyspace","messagePattern":"RCSP (.+?): CloseStream has tokens (.+?) that don't cover the entire keyspace","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigtable/changestreams/action/ReadChangeStreamPartitionAction.java","lineNumber":259,"sourceCode":"        } else {\n          childPartition = closeStream.getChangeStreamContinuationTokens().get(i).getPartition();\n        }\n        childPartitions.add(childPartition);\n        ChangeStreamContinuationToken token =\n            getTokenWithCorrectPartition(\n                partitionRecord.getPartition(),\n                closeStream.getChangeStreamContinuationTokens().get(i));\n        tokenPartitions.add(token.getPartition());\n        metadataTableDao.writeNewPartition(\n            new NewPartition(\n                childPartition, Collections.singletonList(token), watermarkEstimator.getState()));\n      }\n      LOG.info(\n          \"RCSP {}: Split/Merge into {}\",\n          formatByteStringRange(partitionRecord.getPartition()),\n          partitionsToString(childPartitions));\n      if (!coverSameKeySpace(tokenPartitions, partitionRecord.getPartition())) {\n        LOG.warn(\n            \"RCSP {}: CloseStream has tokens {} that don't cover the entire keyspace\",\n            formatByteStringRange(partitionRecord.getPartition()),\n            partitionsToString(tokenPartitions));\n      }\n      // Perform the real cleanup. This step is no op if the race mentioned above occurs (splits and\n      // merges results back to this partition again) because when we register the \"new\" partition,\n      // we unset the deletion bit.\n      metadataTableDao.deleteStreamPartitionRow(partitionRecord.getPartition());\n      return ProcessContinuation.stop();\n    }\n\n    // Update the metadata table with the watermark\n    metadataTableDao.updateWatermark(\n        partitionRecord.getPartition(),\n        watermarkEstimator.getState(),\n        tracker.currentRestriction().getCurrentToken());\n\n    // Start to stream the partition.","sourceCodeStart":241,"sourceCodeEnd":277,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigtable/changestreams/action/ReadChangeStreamPartitionAction.java#L241-L277","documentation":"ReadChangeStreamPartitionAction logs 'RCSP {}: CloseStream has tokens {} that don't cover the entire keyspace' when handling a CloseStream response: the flow tokens returned by the server, converted to partitions, do not cover the same range as the partition being closed. The connector logs the warning and proceeds with cleanup anyway.","triggerScenarios":"During a partition split or merge, the CloseStream response's tokens (tokenPartitions) differ from partitionRecord's full ByteStringRange, failing coverSameKeySpace(tokenPartitions, partition).","commonSituations":"Bigtable automatically split or merged partitions concurrently with the stream close; server-side token truncation; transient inconsistency during rebalancing.","solutions":["Usually no action needed — the connector still performs cleanup and children are processed normally.","If it recurs and data gaps appear, verify child partition registration in the metadata table.","Ensure the change stream was not recreated/resized mid-run; avoid altering table splits aggressively while streaming.","Upgrade the connector for improved split/merge token handling."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":["Accept the warning during normal splits/merges; the connector cleans up regardless.","Avoid aggressive table split changes while a change stream is running.","Verify child partitions are registered if you observe data gaps afterwards."],"tags":["java","apache-beam","bigtable","change-stream","partition"],"backgroundTag":"unexpected-response-shape","analyzedSha":"12126d8942aaf848030c478b4c6a28c6af861c66","analyzedAt":"2026-09-13T01:50:10.254Z","contentChangedAt":"2026-09-13T01:50:10.254Z","schemaVersion":2},"datasetVersion":"2026-09-20T03:17:13.778Z"}