From 28313a0966df4110932e4fcb22c23e48d62d44b3 Mon Sep 17 00:00:00 2001 From: Paul Bardea Date: Sun, 8 Mar 2020 20:30:19 -0400 Subject: [PATCH] importccl: handle protected timestamp removal upon resume If a protected timestamp is removed and the import job is resumed, we should not crash. Release note: None --- pkg/ccl/importccl/import_stmt.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pkg/ccl/importccl/import_stmt.go b/pkg/ccl/importccl/import_stmt.go index 25ab5ebb066b..4891a8682376 100644 --- a/pkg/ccl/importccl/import_stmt.go +++ b/pkg/ccl/importccl/import_stmt.go @@ -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 + } } }