Skip to content

Commit

Permalink
case
Browse files Browse the repository at this point in the history
  • Loading branch information
AlCutter committed Jan 14, 2025
1 parent 83b687a commit 8376e96
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cmd/experimental/migrate/internal/migrate.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,10 @@ func Migrate(ctx context.Context, numWorkers int, sourceSize uint64, sourceRoot
// init
targetSize, targetRoot, err := m.storage.State(ctx)
if err != nil {
return fmt.Errorf("Size: %v", err)
return fmt.Errorf("size: %v", err)
}
if targetSize > sourceSize {
return fmt.Errorf("Target size %d > source size %d", targetSize, sourceSize)
return fmt.Errorf("target size %d > source size %d", targetSize, sourceSize)
}
if targetSize == sourceSize {
if !bytes.Equal(targetRoot, sourceRoot) {
Expand Down Expand Up @@ -137,7 +137,7 @@ func Migrate(ctx context.Context, numWorkers int, sourceSize uint64, sourceRoot
eg.Go(func() error {
r, err := m.storage.AwaitIntegration(ctx, sourceSize)
if err != nil {
return fmt.Errorf("Migration failed: %v", err)
return fmt.Errorf("migration failed: %v", err)
}
if !bytes.Equal(root, sourceRoot) {
return fmt.Errorf("migration completed, but local root hash %x != source root hash %x", targetRoot, sourceRoot)
Expand All @@ -147,7 +147,7 @@ func Migrate(ctx context.Context, numWorkers int, sourceSize uint64, sourceRoot
})

if err := eg.Wait(); err != nil {
return fmt.Errorf("Migration failed: %v", err)
return fmt.Errorf("migration failed: %v", err)
}

klog.Infof("Migration successful.")
Expand Down

0 comments on commit 8376e96

Please sign in to comment.