kafka icon indicating copy to clipboard operation
kafka copied to clipboard

KAFKA-19407 Fix potential IllegalStateException when appending to timeIndex

Open ocadaruma opened this issue 7 months ago • 1 comments

Summary

  • Fix potential race condition in LogSegment#readMaxTimestampAndOffsetSoFar(), which may result in non-monotonic offsets and causes replication to stop.
  • See https://issues.apache.org/jira/browse/KAFKA-19407 for the details how it happen.

ocadaruma avatar Jun 16 '25 14:06 ocadaruma

This PR is supposed to introduce no any new lock contention, because (potentially blocking) lazy timeIndex materialization has already exclusive control by lock in LazyIndex#get

ocadaruma avatar Jun 17 '25 08:06 ocadaruma