mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-14 10:10:42 -07:00
Add op type to panics (#4108)
This updates the `panic` messages on applying meta entries to include the faulty op type, so that we can better work out what's going on in these cases. Signed-off-by: Neil Twigg <neil@nats.io>
This commit is contained in:
@@ -1728,7 +1728,7 @@ func (js *jetStream) applyMetaEntries(entries []*Entry, ru *recoveryUpdates) (bo
|
||||
js.processUpdateStreamAssignment(sa)
|
||||
}
|
||||
default:
|
||||
panic("JetStream Cluster Unknown meta entry op type")
|
||||
panic(fmt.Sprintf("JetStream Cluster Unknown meta entry op type: %v", entryOp(buf[0])))
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2687,7 +2687,7 @@ func (js *jetStream) applyStreamEntries(mset *stream, ce *CommittedEntry, isReco
|
||||
}
|
||||
}
|
||||
default:
|
||||
panic("JetStream Cluster Unknown group entry op type!")
|
||||
panic(fmt.Sprintf("JetStream Cluster Unknown group entry op type: %v", op))
|
||||
}
|
||||
} else if e.Type == EntrySnapshot {
|
||||
if !isRecovering && mset != nil {
|
||||
@@ -4517,7 +4517,7 @@ func (js *jetStream) applyConsumerEntries(o *consumer, ce *CommittedEntry, isLea
|
||||
}
|
||||
o.mu.Unlock()
|
||||
default:
|
||||
panic(fmt.Sprintf("JetStream Cluster Unknown group entry op type! %v", entryOp(buf[0])))
|
||||
panic(fmt.Sprintf("JetStream Cluster Unknown group entry op type: %v", entryOp(buf[0])))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user