machi1990 commented on code in PR #13665: URL: https://github.com/apache/kafka/pull/13665#discussion_r1198624271
########## clients/src/main/java/org/apache/kafka/clients/consumer/internals/ConsumerCoordinator.java: ########## @@ -346,6 +355,10 @@ private Exception invokePartitionsRevoked(final SortedSet<TopicPartition> revoke final long startMs = time.milliseconds(); listener.onPartitionsRevoked(revokedPartitions); sensors.revokeCallbackSensor.record(time.milliseconds() - startMs); + // remove the offset metadata cache for revoked partitions + for (TopicPartition revokedPartition: revokedPartitions) { + this.partitionOffsetsCache.remove(revokedPartition); + } Review Comment: ~~If I understood correctly, this part is not needed at all?~~ > invokePartitionsRevoked won't happen in eagar consumer protocol after partition assignment in each rebalance (check ConsumerCoordinator#onJoinComplete). This is correct. This is only called only when cooperative protocol is used. I'll look to achieve the same for eager consumer protocol. -- 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: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org