Skip to content

Commit

Permalink
[3.1.6 Backport] CBG-3845: Ensure sequence update waits for callback …
Browse files Browse the repository at this point in the history
…invocation (#6797)

Backports #6773 to 3.1.6
  • Loading branch information
bbrks authored May 1, 2024
1 parent 203c1d6 commit 5193389
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion base/dcp_common.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@ func NewDCPCommon(ctx context.Context, callback sgbucket.FeedEventCallbackFunc,
}

func (c *DCPCommon) dataUpdate(seq uint64, event sgbucket.FeedEvent) {
c.updateSeq(event.VbNo, seq, true)
shouldPersistCheckpoint := c.callback(event)
c.updateSeq(event.VbNo, seq, true)
if c.persistCheckpoints && shouldPersistCheckpoint {
c.incrementCheckpointCount(event.VbNo)
}
Expand Down

0 comments on commit 5193389

Please sign in to comment.