File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -296,7 +296,7 @@ func (r *PhysRestore) resolveCleanupStrategy(
296
296
clusterStatus defs.Status ,
297
297
progress nodeStatus ,
298
298
) func () {
299
- if progress .isDbPathUntouched () {
299
+ if progress .isDBPathUntouched () {
300
300
return r .skipCleanup
301
301
}
302
302
@@ -431,6 +431,9 @@ func (r *PhysRestore) flush(ctx context.Context) error {
431
431
} else {
432
432
// fallback strategy is disabled, just wipe-up everything in dbpath
433
433
err = removeAll (r .dbpath , r .log )
434
+ if err != nil {
435
+ return errors .Wrapf (err , "remove db path" )
436
+ }
434
437
}
435
438
436
439
return nil
@@ -936,9 +939,9 @@ func (n nodeStatus) isForCleanup() bool {
936
939
return n & restoreStared != 0 && n & restoreDone == 0
937
940
}
938
941
939
- // isDbPathUntouched returns true when restore progress
942
+ // isDBPathUntouched returns true when restore progress
940
943
// didn't do any data changes within db path.
941
- func (n nodeStatus ) isDbPathUntouched () bool {
944
+ func (n nodeStatus ) isDBPathUntouched () bool {
942
945
return n & restoreStared == 0
943
946
}
944
947
Original file line number Diff line number Diff line change @@ -376,7 +376,6 @@ func TestResolveCleanupStrategy(t *testing.T) {
376
376
if tC .wantStrategy == fullCleanupStrategy {
377
377
if cmpStrategy (strategy ) != cmpStrategy (r .doFullCleanup ) {
378
378
t .Fatalf ("want=%s" , fullCleanupStrategy )
379
-
380
379
}
381
380
} else if tC .wantStrategy == fallbackStrategy {
382
381
if cmpStrategy (strategy ) != cmpStrategy (r .doFallbackCleanup ) {
You can’t perform that action at this time.
0 commit comments