forked from apache/kafka
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CONFLUENT: Fix exception on trying to retrieve tierable segments afte…
…r leader failover (apache#270) After leader failover, segments that have already been tiered may no longer be considered tierable. The criteria for whether a segment is tierable or not depends on several factors, amongst which are whether the segment has already been rolled and whether it has been flushed to disk (i.e. recovery point has advanced). Because each replica performs these operations independently, it is possible that the previous leader tiered a segment that is not yet eligible to be tiered on the new leader. This is not a problem as such. What we need to do is ensure that the archiver sees no tierable segments after the failover until the tiering criteria is met again. This patch adds a check to see if we are in this state, and avoids trying to get a list of candidate segments, which would otherwise throw an exception as the from would be greater than the to when calling MergedLog#localLogSegments.
- Loading branch information
1 parent
1a8c75a
commit b192b40
Showing
2 changed files
with
65 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters