[
https://issues.apache.org/jira/browse/KAFKA-18212?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17904879#comment-17904879
]
Rajini Sivaram commented on KAFKA-18212:
----------------------------------------
In two-broker clusters, rebootstrap will be triggered during rolling restart
(the sequence above is the same as the one in
https://issues.apache.org/jira/browse/KAFKA-18194). But I wouldn't have
expected 2-broker clusters to be normally used in production. You are right,
though, KIP-899 was based on KAFKA-8206.
I did consider lower default `metadata.recovery.rebootstrap.trigger.ms` when
writing the KIP, but made it 5 minutes because connection setup time is 10s-30s
by default and didn't want rebootstrap to be triggered for a very small number
broker connections taking too long in a typical cluster with more brokers.
If we think it is important to avoid rebalance on 2-broker clusters during
rolling restart, we could always wait for the trigger interval, which is
configurable any way.
> Rolling-upgrade broker causes unnecessary re-balance on classic consumer
> ------------------------------------------------------------------------
>
> Key: KAFKA-18212
> URL: https://issues.apache.org/jira/browse/KAFKA-18212
> Project: Kafka
> Issue Type: Bug
> Reporter: Chia-Ping Tsai
> Assignee: Chia-Ping Tsai
> Priority: Blocker
>
> KAFKA-17885 sets the rebootstrap policy by default and introduces
> metadata.recovery.rebootstrap.trigger.ms to control the rebootstrap interval.
> However, DefaultMetadataUpdater#maybeUpdate [0] does not honor
> metadata.recovery.rebootstrap.trigger.ms and triggers a rebootstrap when no
> node is available. This causes the metadata to be reset during rolling
> upgrades of brokers, leading the classic consumer [1] to send a rejoin
> request due to the metadata change.
> [0]
> https://github.com/apache/kafka/blob/7591868aead54fff7d5e8a44c5e06746ed34866b/clients/src/main/java/org/apache/kafka/clients/NetworkClient.java#L1230
> [1]
> https://github.com/apache/kafka/blob/trunk/clients/src/main/java/org/apache/kafka/clients/consumer/internals/ConsumerCoordinator.java#L883
--
This message was sent by Atlassian Jira
(v8.20.10#820010)