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

   Deal the comments of #22622 
   
   - **`OffsetMetadataManager.allOffsetsExpired` → `groupHasNoOffsets`**. 
Per-topic / per-partition expiration check was O(topics × partitions) per 
group. Since the regular offset-expiration cycle already tombstones expired 
offsets, this stage only needs the post-state — a single null-check on 
`offsetsByGroup` plus an `openTransactions.contains` (O(1)). Three cycles 
compose cleanly: offset expiration → topology cleanup → group tombstone. The 
now-unused snapshot overload `OpenTransactions.contains(groupId, topic, 
partition, committedOffset)` is removed.
   
   - **Per-shard batching of the conditional clear write**. All groups in one 
partition's eligibility read hash to the same `__consumer_offsets` partition, 
so the cycle now issues one `scheduleWriteOperation` per shard carrying every 
conditional clear for that shard — not one write per group. Added 
`GroupCoordinatorShard.clearStoredDescriptionTopologyEpochBatch(Map<String, 
Integer>)` that folds per-group GMM results into one `CoordinatorResult`.
   
   - **Restored inline comment** on the pending-transactional-offset guard in 
`cleanupExpiredOffsets` — accidentally dropped during the helper-extract / 
inline round-trip.
   


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

Reply via email to