mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-02 03:38:42 -07:00
Fix shutdown deadlock in TestJetStreamClusterMemLeaderRestart (#4430)
While shutting down a server an error during purge from a memory stream
would cause a deadlock sometimes, this would sometimes show up in the
`TestJetStreamClusterMemLeaderRestart` while tearing down the cluster.
This was introduced in
4d8d01949b
so only relates to v2.10.
This commit is contained in:
@@ -684,6 +684,7 @@ func (ms *memStore) purge(fseq uint64) (uint64, error) {
|
||||
cb := ms.scb
|
||||
bytes := int64(ms.state.Bytes)
|
||||
if fseq < ms.state.LastSeq {
|
||||
ms.mu.Unlock()
|
||||
return 0, fmt.Errorf("partial purges not supported on memory store")
|
||||
}
|
||||
ms.state.FirstSeq = fseq
|
||||
|
||||
Reference in New Issue
Block a user