Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[IMPROVED] Make sure to issue warning on reset for bad state #4583

Merged
merged 1 commit into from Sep 25, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions server/jetstream_cluster.go
Expand Up @@ -2933,6 +2933,10 @@ func (js *jetStream) applyStreamEntries(mset *stream, ce *CommittedEntry, isReco
// If we are the leader or recovering, meaning we own the snapshot,
// we should stepdown and clear our raft state since our snapshot is bad.
if isRecovering || mset.IsLeader() {
mset.mu.RLock()
s, accName, streamName := mset.srv, mset.acc.GetName(), mset.cfg.Name
mset.mu.RUnlock()
s.Warnf("Detected bad stream state, resetting '%s > %s'", accName, streamName)
mset.resetClusteredState(err)
}
}
Expand Down