Skip to content

Commit

Permalink
return state instead of schedule (#55942)
Browse files Browse the repository at this point in the history
  • Loading branch information
GMHDBJD authored Sep 9, 2024
1 parent 2d1ed88 commit 499e45f
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions pkg/executor/show_placement.go
Original file line number Diff line number Diff line change
Expand Up @@ -503,13 +503,9 @@ func fetchPartitionScheduleState(ctx context.Context, scheduleState map[int64]in
}

func fetchTablePartitionScheduleState(ctx context.Context, scheduleState map[int64]infosync.PlacementScheduleState, table *model.TableInfo, state infosync.PlacementScheduleState) (infosync.PlacementScheduleState, error) {
var (
schedule infosync.PlacementScheduleState
err error
)
if table.GetPartitionInfo() != nil {
for _, part := range table.GetPartitionInfo().Definitions {
schedule, err = fetchScheduleState(ctx, scheduleState, part.ID)
schedule, err := fetchScheduleState(ctx, scheduleState, part.ID)
if err != nil {
return infosync.PlacementScheduleStatePending, err
}
Expand All @@ -520,7 +516,7 @@ func fetchTablePartitionScheduleState(ctx context.Context, scheduleState map[int
}
}

return schedule, nil
return state, nil
}

func fetchTableScheduleState(ctx context.Context, scheduleState map[int64]infosync.PlacementScheduleState, table *model.TableInfo) (infosync.PlacementScheduleState, error) {
Expand Down

0 comments on commit 499e45f

Please sign in to comment.