From cb74f3f26e2500d58dcde0dd4237bc3bcdf4491f Mon Sep 17 00:00:00 2001 From: Derek Collison Date: Thu, 28 Sep 2023 14:12:44 -0700 Subject: [PATCH] Add in additional warning when subject skew detected Signed-off-by: Derek Collison --- server/filestore.go | 1 + 1 file changed, 1 insertion(+) diff --git a/server/filestore.go b/server/filestore.go index b7674985..2e4a5378 100644 --- a/server/filestore.go +++ b/server/filestore.go @@ -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 {