Skip to content

Commit

Permalink
CBG-3844 Ensure sequence update waits for callback invocation (#6773)
Browse files Browse the repository at this point in the history
  • Loading branch information
adamcfraser authored Apr 16, 2024
1 parent cc41244 commit 20c48f5
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 @@ -96,8 +96,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 20c48f5

Please sign in to comment.