{"record":{"id":"8b1cec23b04a444c","repo":"apache/beam","slug":"dnp-new-partition-does-not-have-all-the-parents","errorCode":null,"errorMessage":"DNP: New partition does not have all the parents: {}","messagePattern":"DNP: New partition does not have all the parents: (.+?)","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/ProcessNewPartitionsAction.java","lineNumber":90,"sourceCode":"   *   <li>processNewPartition process A-C seeing that only A-B has been recorded and A-B does not\n   *       cover A-C. Do Nothing\n   *   <li>p2 writes to row A-C in metadata table\n   *   <li>processNewPartition process A-C again, seeing that A-B and B-C has been recorded and\n   *       outputs new partition A-C to be streamed.\n   * </ol>\n   *\n   * <p>Note that, the algorithm to verify if a merge is valid, also correctly verifies if a split\n   * is valid. A split is immediately valid as long as the row exists because there's only one\n   * parent that needs to write to that row.\n   *\n   * @param newPartition new partition to be processed\n   * @param receiver to output new partitions\n   */\n  public boolean processNewPartition(\n      NewPartition newPartition, OutputReceiver<PartitionRecord> receiver) {\n    List<ByteStringRange> parentPartitions = newPartition.getParentPartitions();\n    if (!coverSameKeySpace(parentPartitions, newPartition.getPartition())) {\n      LOG.warn(\"DNP: New partition does not have all the parents: {}\", newPartition);\n      return false;\n    }\n\n    String uuid = UniqueIdGenerator.getNextId();\n    PartitionRecord partitionRecord =\n        new PartitionRecord(\n            newPartition.getPartition(),\n            newPartition.getChangeStreamContinuationTokens(),\n            uuid,\n            newPartition.getLowWatermark(),\n            Collections.singletonList(newPartition),\n            endTime);\n    if (parentPartitions.size() > 1) {\n      metrics.incPartitionMergeCount();\n    } else {\n      metrics.incPartitionSplitCount();\n    }\n    LOG.info(\"DNP: Outputting new partition: {}\", partitionRecord);","sourceCodeStart":72,"sourceCodeEnd":108,"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/ProcessNewPartitionsAction.java#L72-L108","documentation":"ProcessNewPartitionsAction.processNewPartition logs 'DNP: New partition does not have all the parents: {}' and returns false when the parent partitions recorded for a NewPartition do not cover the same keyspace as the new partition itself. The new partition is not registered, preventing incorrect state in the change stream connector.","triggerScenarios":"A NewPartition row read from the metadata table lists parent partitions whose union of ByteStringRanges does not exactly cover the new partition's range (e.g. split recorded with wrong parents, or parents already cleaned up).","commonSituations":"Corrupted or manually edited metadata table rows; races between merge operations and parent cleanup; connector bugs during concurrent split and merge of adjacent partitions.","solutions":["Inspect the metadata table row for the NewPartition and verify parentPartitions cover the same token range.","Delete/repair the inconsistent NewPartition row so it can be re-detected from the change stream.","Ensure a single job instance owns the stream and avoid manual metadata edits.","Upgrade to a newer Beam release where split/merge parent tracking was fixed."],"exampleFix":"// before\n// metadata row: newPartition=[a,c) parents=[[a,b)]  (gap [b,c))\n// after\n// repair row so parents cover the full range: parents=[[a,b),[b,c)]\n// or remove the row and let DetectNewPartitionsAction re-register it","handlingStrategy":"validation","validationCode":"// Validate parent coverage before writing a NewPartition row: parents' union must equal newPartition range","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Do not hand-edit NewPartition rows in the metadata table.","Avoid running split/merge-heavy workloads with multiple concurrent jobs on one stream.","Upgrade the connector if parent coverage warnings recur."],"tags":["java","apache-beam","bigtable","change-stream","partition"],"backgroundTag":"schema-validation-failed","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"}