Fix HW checkpoint bug
@@ -362,6 +362,7 @@ func (l *CommitLog) checkpointHWLoop() {
if !ok {
return
}
+ }
l.mu.RLock()
if err := l.checkpointHW(); err != nil {
panic(errors.Wrap(err, "failed to checkpoint high watermark"))
@@ -369,7 +370,6 @@ func (l *CommitLog) checkpointHWLoop() {
l.mu.RUnlock()
}
}
-}
func (l *CommitLog) checkpointHW() error {
var (
