Skip to content

Commit

Permalink
changefeedcli: check context errors and don't log them
Browse files Browse the repository at this point in the history
Fell out of testing changefeeds some more.

Release justification: low risk, high benefit changes to existing functionality

Release note: None
  • Loading branch information
ajwerner committed Mar 10, 2020
1 parent bc169fd commit 99ea2ac
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/ccl/changefeedccl/changefeed_stmt.go
Original file line number Diff line number Diff line change
Expand Up @@ -514,6 +514,9 @@ func (b *changefeedResumer) Resume(
return nil
}
if !IsRetryableError(err) {
if ctx.Err() != nil {
return ctx.Err()
}
log.Warningf(ctx, `CHANGEFEED job %d returning with error: %+v`, jobID, err)
return err
}
Expand All @@ -526,6 +529,9 @@ func (b *changefeedResumer) Resume(
// been updated by the changeFrontier processor since the flow started.
reloadedJob, reloadErr := execCfg.JobRegistry.LoadJob(ctx, jobID)
if reloadErr != nil {
if ctx.Err() != nil {
return ctx.Err()
}
log.Warningf(ctx, `CHANGEFEED job %d could not reload job progress; `+
`continuing from last known high-water of %s: %v`,
jobID, progress.GetHighWater(), reloadErr)
Expand Down

0 comments on commit 99ea2ac

Please sign in to comment.