mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-02 03:38:42 -07:00
[IMPROVED] Add in additional warning when subject skew detected (#4606)
Signed-off-by: Derek Collison <derek@nats.io>
This commit is contained in:
@@ -3225,6 +3225,7 @@ func (fs *fileStore) enforceMsgPerSubjectLimit() {
|
||||
// We had an issue with a use case where psim (and hence fss) were correct but idx was not and was not properly being caught.
|
||||
// So do a quick sanity check here. If we detect a skew do a rebuild then re-check.
|
||||
if numMsgs != fs.state.Msgs {
|
||||
fs.warn("Detected skew in subject-based total (%d) vs raw total (%d), rebuilding", numMsgs, fs.state.Msgs)
|
||||
// Clear any global subject state.
|
||||
fs.psim = make(map[string]*psi)
|
||||
for _, mb := range fs.blks {
|
||||
|
||||
Reference in New Issue
Block a user