Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions server/jetstream_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -2543,10 +2543,14 @@ func (js *jetStream) monitorStream(mset *stream, sa *streamAssignment, sendSnaps
for {
select {
case <-s.quitCh:
// Server shutting down, but we might receive this before qch, so try to snapshot.
doSnapshot()
return
case <-mqch:
return
case <-qch:
// Clean signal from shutdown routine so do best effort attempt to snapshot.
doSnapshot()
return
case <-aq.ch:
var ne, nb uint64
Expand Down Expand Up @@ -4980,8 +4984,12 @@ func (js *jetStream) monitorConsumer(o *consumer, ca *consumerAssignment) {
for {
select {
case <-s.quitCh:
// Server shutting down, but we might receive this before qch, so try to snapshot.
doSnapshot(false)
return
case <-qch:
// Clean signal from shutdown routine so do best effort attempt to snapshot.
doSnapshot(false)
return
case <-aq.ch:
ces := aq.pop()
Expand Down