dajac opened a new pull request, #19713:
URL: https://github.com/apache/kafka/pull/19713

   Group Coordinator Shards are not unloaded when `__consumer_offsets` topic is 
deleted. The unloading is scheduled but it is ignored because the epoch is 
equal to the current epoch:
   
   ```
   [2025-05-13 08:46:00,883] INFO [GroupCoordinator id=1] Scheduling unloading 
of metadata for __consumer_offsets-0 with epoch OptionalInt[0] 
(org.apache.kafka.coordinator.common.runtime.CoordinatorRuntime)
   [2025-05-13 08:46:00,883] INFO [GroupCoordinator id=1] Scheduling unloading 
of metadata for __consumer_offsets-1 with epoch OptionalInt[0] 
(org.apache.kafka.coordinator.common.runtime.CoordinatorRuntime)
   [2025-05-13 08:46:00,883] INFO [GroupCoordinator id=1] Ignored unloading 
metadata for __consumer_offsets-0 in epoch OptionalInt[0] since current epoch 
is 0. (org.apache.kafka.coordinator.common.runtime.CoordinatorRuntime)
   [2025-05-13 08:46:00,883] INFO [GroupCoordinator id=1] Ignored unloading 
metadata for __consumer_offsets-1 in epoch OptionalInt[0] since current epoch 
is 0. (org.apache.kafka.coordinator.common.runtime.CoordinatorRuntime)
   ```
   
   This patch fixes the issue by not setting the leader epoch in this case. The 
coordinator expects the leader epoch to be incremented when the resignation 
code is called. When the topic is deleted, the epoch is not incremented. 
Therefore, we must not use it. Note that this is aligned with deleted 
partitions are handled too.


-- 
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

Reply via email to