Skip to content

Commit

Permalink
Merge #6292
Browse files Browse the repository at this point in the history
6292: [Backport stable/0.26] fix(atomix): compact all index when reseting the segments r=deepthidevaki a=deepthidevaki

## Description

Backport #6253

closes #6237 

Co-authored-by: Deepthi Devaki Akkoorath <[email protected]>
  • Loading branch information
zeebe-bors[bot] and deepthidevaki authored Feb 10, 2021
2 parents 00f7ead + a84e429 commit b80ddcf
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ public void commit(final long index) {
@Override
public void reset(final long index) {
if (index > currentSegment.index()) {
// delete all index mapping
currentSegment.compactIndex(index + 1);
// delete all segments and create an empty one
currentSegment = journal.resetSegments(index);
currentWriter = currentSegment.writer();
} else {
Expand Down

0 comments on commit b80ddcf

Please sign in to comment.