kafka/storage
Okada Haruki 7c30eed66c KAFKA-16541 Fix potential leader-epoch checkpoint file corruption (#15993)
A patch for KAFKA-15046 got rid of fsync on LeaderEpochFileCache#truncateFromStart/End for performance reason, but it turned out this could cause corrupted leader-epoch checkpoint file on ungraceful OS shutdown, i.e. OS shuts down in the middle when kernel is writing dirty pages back to the device.

To address this problem, this PR makes below changes: (1) Revert LeaderEpochCheckpoint#write to always fsync
(2) truncateFromStart/End now call LeaderEpochCheckpoint#write asynchronously on scheduler thread
(3) UnifiedLog#maybeCreateLeaderEpochCache now loads epoch entries from checkpoint file only when current cache is absent

Reviewers: Jun Rao <junrao@gmail.com>
2024-06-12 06:33:09 +05:30
..
api/src KAFKA-16904: Metric to measure the latency of remote read requests (#16209) 2024-06-11 21:08:39 +05:30
src KAFKA-16541 Fix potential leader-epoch checkpoint file corruption (#15993) 2024-06-12 06:33:09 +05:30