Skip to content

Commit

Permalink
importccl: handle protected timestamp removal upon resume
Browse files Browse the repository at this point in the history
If a protected timestamp is removed and the import job is resumed, we
should not crash.

Release note: None
  • Loading branch information
pbardea committed Mar 9, 2020
1 parent 2198386 commit 28313a0
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion pkg/ccl/importccl/import_stmt.go
Original file line number Diff line number Diff line change
Expand Up @@ -978,7 +978,13 @@ func (r *importResumer) Resume(
ptsID := details.ProtectedTimestampRecord
if ptsID != nil && !r.testingKnobs.ignoreProtectedTimestamps {
if err := p.ExecCfg().ProtectedTimestampProvider.Verify(ctx, *ptsID); err != nil {
return err
if errors.Is(err, protectedts.ErrNotExists) {
// No reason to return an error which might cause problems if it doesn't
// seem to exist.
log.Warningf(ctx, "failed to release protected which seems not to exist: %v", err)
} else {
return err
}
}
}

Expand Down

0 comments on commit 28313a0

Please sign in to comment.