Skip to content

Commit

Permalink
changefeedccl: do not error out on checkpoint during pause-requested
Browse files Browse the repository at this point in the history
Resolves #83253

Previously there was a race condition where we would attempt to
checkpoint while the job was in a pause-requested state.  Since the
changefeed should still be running normally during requested states this
should not error.

Release note (bug fix): Changefeeds no longer error out when attempting
to checkpoint during intermediate pause-requested or cancel-requested
states.
  • Loading branch information
samiskin committed Jun 28, 2022
1 parent 969bcf7 commit 0707e55
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/ccl/changefeedccl/changefeed_processors.go
Original file line number Diff line number Diff line change
Expand Up @@ -1241,8 +1241,11 @@ func (cf *changeFrontier) checkpointJobProgress(
return cf.js.job.Update(cf.Ctx, nil, func(
txn *kv.Txn, md jobs.JobMetadata, ju *jobs.JobUpdater,
) error {
// If we're unable to update the job due to the job state, such as during
// pause-requested, simply skip the checkpoint
if err := md.CheckRunningOrReverting(); err != nil {
return err
log.Warningf(cf.Ctx, "skipping changefeed checkpoint: %s", err.Error())
return nil
}

// Advance resolved timestamp.
Expand Down

0 comments on commit 0707e55

Please sign in to comment.