lianetm commented on code in PR #17559:
URL: https://github.com/apache/kafka/pull/17559#discussion_r1821482086
##########
clients/src/main/java/org/apache/kafka/clients/consumer/KafkaConsumer.java:
##########
@@ -873,7 +874,8 @@ public ConsumerRecords<K, V> poll(final Duration timeout) {
* is too large or if the topic does not exist).
* @throws org.apache.kafka.common.errors.TimeoutException if the timeout
specified by {@code default.api.timeout.ms} expires
* before successful completion of the offset commit
- * @throws org.apache.kafka.common.errors.FencedInstanceIdException if
this consumer instance gets fenced by broker.
+ * @throws org.apache.kafka.common.errors.FencedInstanceIdException if
this consumer is classicKafkaConsumer and this
Review Comment:
I would say that we should not refer to the names of the internal
implementations here (classic vs async consumer), and maybe better to refer to
the protocol in use? (which is what the user can define via the
`group.protocol` config, it cannot directly choose classic or async consumer).
What do you think? Something like: if this consumer is using the classic group
protocol....
##########
clients/src/main/java/org/apache/kafka/clients/consumer/KafkaConsumer.java:
##########
@@ -829,7 +829,8 @@ public void assign(Collection<TopicPartition> partitions) {
* topic (per {@link
org.apache.kafka.common.internals.Topic#validate(String)})
* @throws org.apache.kafka.common.errors.UnsupportedVersionException if
the consumer attempts to fetch stable offsets
* when the broker doesn't support this feature
- * @throws org.apache.kafka.common.errors.FencedInstanceIdException if
this consumer instance gets fenced by broker.
+ * @throws org.apache.kafka.common.errors.FencedInstanceIdException if
this consumer is classicKafkaConsumer and this
Review Comment:
We shouldn't change this here on the poll, only on `commitSync` and
`commitAsync`. The consumer could get FencedInstanceId on poll with the new
protocol (ex. member removed via admin + next HB). It's only the commit path
where we can clean up
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]