Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Pending Closed
-
None
-
None
-
None
Description
When leadership of an offsets partition moves, the new leader loads offsets from that partition into the offset manager cache.
Independently, the offset manager has a periodic cleanup task for stale offsets that removes old offsets from the cache and appends tombstones for those. If the partition happens to contain much older offsets (earlier in the log) and inserts those into the cache; the cleanup task may run and see those offsets (which it deems to be stale) and proceeds to remove from the cache and append a tombstone to the end of the log. The tombstone will override the true latest offset and a subsequent offset fetch request will return no offset.
We just need to prevent the cleanup task from running during an offset load.