pingcap / pingcap/tidb

Evaluate PlacementScheduleStatePending state for placement scheduling

Open
#35,314 3 comments 0 reactions 0 assignees View on GitHub
type/enhancement
Dominant language
Go
Stars
40.5k
Forks
6.2k
PR merge metrics
PR metrics pending

Description

## Enhancement

From what I observed,`PlacementScheduleStatePending` get returned in the case where's a issue or even when there's an error in code, which is misleading and error prone in my opinion. I may be lack of context here, do we want this state to serve as an indicator of the state before `PlacementScheduleStateInProgress`, and also cover the case if there's any bug or error in code? Because if there's a bug in code, we see an err first, then return `PlacementScheduleStatePending` with a nil error, seems like this hides the real issue and can't be covered by unit test in some case.

Please help triage if this state serves what we want and if we want another state or rename this one to make it more clear.

https://github.com/pingcap/tidb/blob/06737ecd29b0ae633d9ac89b0660e7a43939c88d/domain/infosync/region.go#L28-L49

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.