You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Lianet Magrans (Jira)" <ji...@apache.org> on 2026/09/11 15:11:00 UTC
[jira] [Created] (KAFKA-21072) Client metadata may ignore expanded partitions after topic re-creation
Lianet Magrans created KAFKA-21072:
--------------------------------------
Summary: Client metadata may ignore expanded partitions after topic re-creation
Key: KAFKA-21072
URL: https://issues.apache.org/jira/browse/KAFKA-21072
Project: Kafka
Issue Type: Bug
Components: clients, consumer
Reporter: Lianet Magrans
Client metadata logic ignores metadata received with an older epoch. But this may lead to clients ignoring new partitions in cases of topic re-creation:
* topic is in metadata with N partitions (topicId-1) -> known epochs > 0
* deleted + recreated (topicId-2) with 2 partitions -> epochs back to 0 for the 2 partitions only
* topic expanded to N partitions (same topicId-2) -> metadata dropped for all new partitions because they will include epoch 0 older than the last known leader epoch (which is the stale one from before the re-creation)
https://github.com/apache/kafka/blob/051a1860d55ee96eec2eb2c75ee1d6dd7c5183c9/clients/src/main/java/org/apache/kafka/clients/Metadata.java#L593-L595
--
This message was sent by Atlassian Jira
(v8.20.10#820010)