{"record":{"id":"70fc8aeadeee8c93","repo":"nats-io/nats-server","slug":"unsafe-quorum-rescue-expired-quorum-restored-to","errorCode":null,"errorMessage":"Unsafe quorum rescue expired, quorum restored to %d","messagePattern":"Unsafe quorum rescue expired, quorum restored to (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/raft.go","lineNumber":1378,"sourceCode":"\tn.qn = qn\n\tn.warn(\"Unsafe quorum rescue applied, quorum lowered %d -> %d for %v\", prev, qn, rescueQuorumTimeout)\n\n\t// Make sure an election can happen soon.\n\tn.resetElect(randCampaignTimeout())\n\treturn prev, qn, nil\n}\n\n// expireRescueLocked runs when the rescue timeout fires and restores the natural quorum.\n// Lock should be held.\nfunc (n *raft) expireRescueLocked(t *time.Timer) {\n\tif n.State() == Closed || n.rescue != t {\n\t\treturn\n\t}\n\t// Must clear the timer first, recalcQuorum keeps the rescued quorum\n\t// while it sees an active rescue.\n\tn.rescue = nil\n\tn.recalcQuorum()\n\tn.warn(\"Unsafe quorum rescue expired, quorum restored to %d\", n.qn)\n}\n\n// PauseApply will allow us to pause processing of append entries onto our\n// external apply queue. In effect this means that the upper layer will no longer\n// receive any new entries from the Raft group.\nfunc (n *raft) PauseApply() error {\n\tif n.State() == Leader {\n\t\treturn errAlreadyLeader\n\t}\n\tn.Lock()\n\tdefer n.Unlock()\n\tn.pauseApplyLocked()\n\treturn nil\n}\n\nfunc (n *raft) pauseApplyLocked() {\n\t// If we are currently not a follower, make sure we step down.\n\tif n.State() != Follower {","sourceCodeStart":1360,"sourceCodeEnd":1396,"githubUrl":"https://github.com/nats-io/nats-server/blob/3a66a489d262bf89b71a71c955c94920394532f3/server/raft.go#L1360-L1396","documentation":"The RescueQuorum timer fired (or recalc ended the rescue): the artificially lowered quorum is discarded and the natural quorum (from current cluster size) is restored. Guarded by n.rescue == t so only the live rescue expires; a stale timer is ignored.","triggerScenarios":"Thrown at server/raft.go:1378 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Ensure enough peers are back or the cluster may lose quorum again","Re-run rescue only if still degraded and data-loss risk is accepted","Investigate why peers remained down for the full rescue window"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"3a66a489d262bf89b71a71c955c94920394532f3","analyzedAt":"2026-09-02T04:41:54.247Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T15:18:49.778Z"}