Skip to content

Commit

Permalink
Merge pull request #94860 from msbutler/butler-import-cancel-logging
Browse files Browse the repository at this point in the history
import: add logging to import cancellation
  • Loading branch information
msbutler authored Jan 12, 2023
2 parents 8330bdb + 6b06335 commit 73485e5
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/cmd/roachtest/tests/backup.go
Original file line number Diff line number Diff line change
Expand Up @@ -1149,7 +1149,9 @@ func runBackupMVCCRangeTombstones(ctx context.Context, t test.Test, c cluster.Cl
require.NoError(t, err)
_, err = conn.Exec(`SET CLUSTER SETTING storage.mvcc.range_tombstones.enabled = 't'`)
require.NoError(t, err)

_, err = conn.Exec(`SET CLUSTER SETTING server.debug.default_vmodule = 'txn=2,sst_batcher=4,
revert=2'`)
require.NoError(t, err)
// Wait for ranges to upreplicate.
require.NoError(t, WaitFor3XReplication(ctx, t, conn))

Expand Down
1 change: 1 addition & 0 deletions pkg/sql/gcjob/table_garbage_collection.go
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,7 @@ func deleteAllSpanData(
})
log.VEventf(ctx, 2, "delete range %s - %s", lastKey, endKey)
if err := db.Run(ctx, &b); err != nil {
log.Errorf(ctx, "delete range %s - %s failed: %s", span.Key, span.EndKey, err.Error())
return errors.Wrapf(err, "delete range %s - %s", lastKey, endKey)
}
n = 0
Expand Down
1 change: 1 addition & 0 deletions pkg/sql/importer/import_job.go
Original file line number Diff line number Diff line change
Expand Up @@ -1394,6 +1394,7 @@ func (r *importResumer) OnFailOrCancel(ctx context.Context, execCtx interface{},
ctx context.Context, txn *kv.Txn, descsCol *descs.Collection,
) error {
if err := r.dropTables(ctx, txn, descsCol, cfg); err != nil {
log.Errorf(ctx, "drop tables failed: %s", err.Error())
return err
}

Expand Down
1 change: 1 addition & 0 deletions pkg/sql/revert.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ func DeleteTableWithPredicate(
delRangeRequest)

if err != nil {
log.Errorf(ctx, "delete range %s - %s failed: %s", span.Key, span.EndKey, err.String())
return errors.Wrapf(err.GoError(), "delete range %s - %s", span.Key, span.EndKey)
}
span = nil
Expand Down

0 comments on commit 73485e5

Please sign in to comment.