Skip to content

Commit

Permalink
solve conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
kutluhanmetin committed Nov 6, 2023
1 parent 17652a4 commit 394bc9f
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions base/commands/migration/migration_stages.go
Original file line number Diff line number Diff line change
Expand Up @@ -357,13 +357,18 @@ func querySingleRow(ctx context.Context, ci *hazelcast.ClientInternal, query str

func maybePrintWarnings(ctx context.Context, ec plug.ExecContext, ci *hazelcast.ClientInternal, migrationID string) {
q := fmt.Sprintf(`SELECT JSON_QUERY(this, '$.warnings' WITH WRAPPER) FROM %s WHERE __key='%s'`, StatusMapName, migrationID)
row, err := querySingleRow(ctx, ci, q)
r, err := querySingleRow(ctx, ci, q)
if err != nil {
ec.Logger().Error(err)
return
}
rr, err := r.Get(0)
if err != nil {
ec.Logger().Error(err)
return
}
var warnings []string
err = json.Unmarshal(row.(serialization.JSON), &warnings)
err = json.Unmarshal(rr.(serialization.JSON), &warnings)
if err != nil {
ec.Logger().Error(err)
return
Expand All @@ -373,4 +378,4 @@ func maybePrintWarnings(ctx context.Context, ec plug.ExecContext, ci *hazelcast.
} else {
ec.PrintlnUnnecessary(fmt.Sprintf("You have %d warnings that you can find in your migration report.", len(warnings)))
}
}
}

0 comments on commit 394bc9f

Please sign in to comment.