{"record":{"id":"3b3e6788cb08c856","repo":"apache/iceberg","slug":"committer-found-no-partitions-assigned-across-a","errorCode":null,"errorMessage":"Committer {} found no partitions assigned across all members, cannot determine leader","messagePattern":"Committer (.+?) found no partitions assigned across all members, cannot determine leader","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"kafka-connect/kafka-connect/src/main/java/org/apache/iceberg/connect/channel/CommitterImpl.java","lineNumber":100,"sourceCode":"    }\n\n    Collection<MemberDescription> members = groupDesc.members();\n    if (containsFirstPartition(members, currentAssignedPartitions)) {\n      membersWhenWorkerIsCoordinator = members;\n      return true;\n    }\n\n    return false;\n  }\n\n  @VisibleForTesting\n  boolean containsFirstPartition(\n      Collection<MemberDescription> members, Collection<TopicPartition> partitions) {\n    // Determine the first partition across all members to elect the leader\n    TopicPartition firstTopicPartition = findFirstTopicPartition(members);\n\n    if (firstTopicPartition == null) {\n      LOG.warn(\n          \"Committer {} found no partitions assigned across all members, cannot determine leader\",\n          taskId);\n      return false;\n    }\n\n    boolean containsFirst = partitions.contains(firstTopicPartition);\n    if (containsFirst) {\n      LOG.info(\n          \"Committer {} contains the first partition {}, this task is the leader\",\n          taskId,\n          firstTopicPartition);\n    } else {\n      LOG.debug(\n          \"Committer {} does not contain the first partition {}, not the leader\",\n          taskId,\n          firstTopicPartition);\n    }\n","sourceCodeStart":82,"sourceCodeEnd":118,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/kafka-connect/kafka-connect/src/main/java/org/apache/iceberg/connect/channel/CommitterImpl.java#L82-L118","documentation":"When electing the committer leader, the code computes the first topic partition across all member assignments; if no member has any partition assigned, no leader can be determined and containsFirstPartition returns false. This means the consumer group has no partitions at all, so leader-dependent work (coordination) cannot proceed.","triggerScenarios":"containsFirstPartition invoked with an empty or partition-less members set — e.g. during startup before assignment, or after all partitions were revoked in a rebalance while the committer is still processing.","commonSituations":"Connector started with zero assigned partitions (source topic empty or topic deleted); rebalance in progress where every member lost its partitions; misconfigured topics regex matching no topics.","solutions":["Verify the connector's topics/topics-regexp actually match existing Kafka topics with partitions.","Wait for the rebalance to complete; this is transient during group reassignment and self-corrects on the next assignment.","Check Kafka consumer group state (kafka-consumer-groups --describe) to confirm partition assignment for the connector group.","If the topic was deleted/recreated, restart the connector tasks so they pick up the new partition layout."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// before deploying, verify topics exist and have partitions\nkafka-topics --bootstrap-server $BOOTSTRAP --describe --topic <connector-topic>\nkafka-consumer-groups --bootstrap-server $BOOTSTRAP --describe --group <connect-group>","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Validate topics/topics-regexp matches real topics with partitions before starting the connector.","Expect this warning transiently during rebalances; do not treat as a failure.","Monitor consumer group assignment to detect stuck rebalances.","Restart tasks after topic delete/recreate operations."],"tags":["kafka","connect","leader-election","rebalance"],"backgroundTag":"empty-result-set","analyzedSha":"86d9c8fc543e7c56c9f624eb725f76c9baff9570","analyzedAt":"2026-09-12T00:46:39.097Z","contentChangedAt":"2026-09-12T00:46:39.097Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}