Skip to content

Commit 345b400

Browse files
committed
Apply reviewdog fixes
1 parent 71752a3 commit 345b400

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

pbm/restore/physical.go

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ func (r *PhysRestore) resolveCleanupStrategy(
296296
clusterStatus defs.Status,
297297
progress nodeStatus,
298298
) func() {
299-
if progress.isDbPathUntouched() {
299+
if progress.isDBPathUntouched() {
300300
return r.skipCleanup
301301
}
302302

@@ -431,6 +431,9 @@ func (r *PhysRestore) flush(ctx context.Context) error {
431431
} else {
432432
// fallback strategy is disabled, just wipe-up everything in dbpath
433433
err = removeAll(r.dbpath, r.log)
434+
if err != nil {
435+
return errors.Wrapf(err, "remove db path")
436+
}
434437
}
435438

436439
return nil
@@ -936,9 +939,9 @@ func (n nodeStatus) isForCleanup() bool {
936939
return n&restoreStared != 0 && n&restoreDone == 0
937940
}
938941

939-
// isDbPathUntouched returns true when restore progress
942+
// isDBPathUntouched returns true when restore progress
940943
// didn't do any data changes within db path.
941-
func (n nodeStatus) isDbPathUntouched() bool {
944+
func (n nodeStatus) isDBPathUntouched() bool {
942945
return n&restoreStared == 0
943946
}
944947

pbm/restore/physical_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,6 @@ func TestResolveCleanupStrategy(t *testing.T) {
376376
if tC.wantStrategy == fullCleanupStrategy {
377377
if cmpStrategy(strategy) != cmpStrategy(r.doFullCleanup) {
378378
t.Fatalf("want=%s", fullCleanupStrategy)
379-
380379
}
381380
} else if tC.wantStrategy == fallbackStrategy {
382381
if cmpStrategy(strategy) != cmpStrategy(r.doFallbackCleanup) {

0 commit comments

Comments
 (0)