Skip to content

Commit 4c54c68

Browse files
committed
a few more tweaks
1 parent 1bfee57 commit 4c54c68

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

internal/verifier/check.go

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -127,11 +127,10 @@ func (verifier *Verifier) CheckWorker(ctxIn context.Context) error {
127127
if verificationStatus.AddedTasks > 0 || verificationStatus.ProcessingTasks > 0 {
128128
waitForTaskCreation++
129129
time.Sleep(verifier.verificationStatusCheckInterval)
130-
continue
131130
} else {
132131
verifier.PrintVerificationSummary(ctx, GenerationComplete)
133132
succeeded = true
134-
canceler(errors.New("ok"))
133+
canceler(errors.Errorf("generation %d succeeded", generation))
135134
return nil
136135
}
137136
}
@@ -438,12 +437,7 @@ func (verifier *Verifier) work(ctx context.Context, workerNum int) error {
438437
}
439438

440439
continue
441-
/*
442-
} else if errors.Is(err, context.Canceled) {
443-
return nil
444-
*/
445440
} else if err != nil {
446-
447441
return errors.Wrap(
448442
err,
449443
"failed to seek next task",
@@ -467,6 +461,8 @@ func (verifier *Verifier) work(ctx context.Context, workerNum int) error {
467461
if err != nil {
468462
return err
469463
}
464+
default:
465+
panic("Unknown verification task type: " + task.Type)
470466
}
471467
}
472468
}

internal/verifier/migration_verifier.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1219,7 +1219,7 @@ func (verifier *Verifier) verifyMetadataAndPartitionCollection(
12191219
task.Status = verificationTaskMetadataMismatch
12201220
}
12211221

1222-
// We’ve confirmed that the collection metadata (including indices and shard keys)
1222+
// We’ve confirmed that the collection metadata (including indices)
12231223
// matches between soruce & destination. Now we can partition the collection.
12241224

12251225
if task.Generation == 0 {

0 commit comments

Comments
 (0)