Skip to content

Commit

Permalink
(fix) panic when RocksDBSegmentLogStorage#onTruncateSuffix log not fo…
Browse files Browse the repository at this point in the history
…und.
  • Loading branch information
killme2008 committed Feb 26, 2020
1 parent 3c5164c commit 50e9925
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -41,7 +41,6 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.alipay.sofa.jraft.error.LogEntryCorruptedException;
import com.alipay.sofa.jraft.option.RaftOptions;
import com.alipay.sofa.jraft.storage.impl.RocksDBLogStorage;
import com.alipay.sofa.jraft.storage.log.CheckpointFile.Checkpoint;
Expand Down Expand Up @@ -891,7 +890,8 @@ protected void onTruncateSuffix(final long lastIndexKept) throws RocksDBExceptio
}
} else {
// Data not found, should not happen.
throw new LogEntryCorruptedException("Log entry data not found at index=" + prevIndex);
LOG.warn("Log entry data not found at index={}.", prevIndex);
prevIndex--;
}
}
}
Expand Down

0 comments on commit 50e9925

Please sign in to comment.