mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-17 11:24:44 -07:00
Under rare scenarios we could fail to load, but this should not be a panic.
We should recover on the lines below. Signed-off-by: Derek Collison <derek@nats.io>
This commit is contained in:
@@ -413,7 +413,8 @@ func (s *Server) startRaftNode(cfg *RaftConfig) (RaftNode, error) {
|
||||
for index := state.FirstSeq; index <= state.LastSeq; index++ {
|
||||
ae, err := n.loadEntry(index)
|
||||
if err != nil {
|
||||
panic("err loading entry from WAL")
|
||||
n.warn("Could not load %d from WAL [%+v] with error: %v", index, state, err)
|
||||
continue
|
||||
}
|
||||
if ae.pindex != index-1 {
|
||||
n.warn("Corrupt WAL, truncating and fixing")
|
||||
|
||||
Reference in New Issue
Block a user