[FIXED] We will panic since we unlock the mb in removeMsgBlock (#4571)

Signed-off-by: Derek Collison <derek@nats.io>
This commit is contained in:
Derek Collison
2023-09-21 18:57:10 -07:00
committed by GitHub

View File

@@ -1837,7 +1837,10 @@ func (fs *fileStore) recoverMsgs() error {
}
}
for _, mb := range emptyBlks {
// Need the mb lock here.
mb.mu.Lock()
fs.removeMsgBlock(mb)
mb.mu.Unlock()
}
}