diff --git a/base/commands/migration/common.go b/base/commands/migration/common.go index c9f2cf79..1fdd8701 100644 --- a/base/commands/migration/common.go +++ b/base/commands/migration/common.go @@ -22,7 +22,11 @@ func findMigrationInProgress(ctx context.Context, ci *hazelcast.ClientInternal) if err != nil { return mip, fmt.Errorf("finding migration in progress: %w", err) } - m := r.(serialization.JSON) + rr, err := r.Get(0) + if err != nil { + return mip, fmt.Errorf("finding migration in progress: %w", err) + } + m := rr.(serialization.JSON) if err = json.Unmarshal(m, &mip); err != nil { return mip, fmt.Errorf("parsing migration in progress: %w", err) } diff --git a/base/commands/migration/const.go b/base/commands/migration/const.go index 724b32df..c0d772ca 100644 --- a/base/commands/migration/const.go +++ b/base/commands/migration/const.go @@ -4,6 +4,7 @@ package migration const ( StartQueueName = "__datamigration_start_queue" + EstimateQueueName = "__datamigration_estimate_queue" StatusMapName = "__datamigration_migrations" DebugLogsListPrefix = "__datamigration_debug_logs_" CancelQueue = "__datamigration_cancel_queue" diff --git a/base/commands/migration/estimate.go b/base/commands/migration/estimate.go index 8dde2888..790601c1 100644 --- a/base/commands/migration/estimate.go +++ b/base/commands/migration/estimate.go @@ -32,7 +32,7 @@ Estimation usually ends within 15 seconds.`, banner)) if !paths.Exists(conf) { return fmt.Errorf("migration config does not exist: %s", conf) } - mID := MakeMigrationID() + mID := makeMigrationID() stages, err := NewEstimateStages(ec.Logger(), mID, conf) if err != nil { return err