Skip to content

Commit 2133c1f

Browse files
committed
backup: don't start download job if theres no table data
1 parent 7494f98 commit 2133c1f

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

pkg/backup/restore_job.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1866,9 +1866,6 @@ func (r *restoreResumer) doResume(ctx context.Context, execCtx interface{}) erro
18661866
return err
18671867
}
18681868
}
1869-
if err := r.maybeWriteDownloadJob(ctx, p.ExecCfg(), preData, mainData); err != nil {
1870-
return err
1871-
}
18721869
emitRestoreJobEvent(ctx, p, jobs.StateSucceeded, r.job)
18731870
return nil
18741871
}

pkg/backup/testdata/backup-restore/online-restore-empty-database

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ RESTORE DATABASE d FROM LATEST IN 'nodelocal://1/cluster/' with EXPERIMENTAL DEF
2222
query-sql retry
2323
SELECT count(*) FROM [SHOW JOBS] WHERE job_type='RESTORE' and status='succeeded';
2424
----
25-
2
25+
1

0 commit comments

Comments
 (0)