Skip to content

Commit

Permalink
Fix bug that would race around check for last sequence per subject
Browse files Browse the repository at this point in the history
Signed-off-by: Derek Collison <derek@nats.io>
  • Loading branch information
derekcollison committed Jul 18, 2023
1 parent 360f807 commit 244dda8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/stream.go
Original file line number Diff line number Diff line change
Expand Up @@ -3838,7 +3838,7 @@ func (mset *stream) processJetStreamMsg(subject, reply string, hdr, msg []byte,
}
// Expected last sequence per subject.
// If we are clustered we have prechecked seq > 0.
if seq, exists := getExpectedLastSeqPerSubject(hdr); exists && (!isClustered || seq == 0) {
if seq, exists := getExpectedLastSeqPerSubject(hdr); exists {
// TODO(dlc) - We could make a new store func that does this all in one.
var smv StoreMsg
var fseq uint64
Expand Down

0 comments on commit 244dda8

Please sign in to comment.