apache / helix

Mirror of Apache Helix
Apache License 2.0
457 stars 218 forks source link

Add an API endpoint to allow a participant to set the current state of a partition stuck in any state to ERROR. #2791

Closed csudharsanan closed 2 months ago

csudharsanan commented 3 months ago

Is your feature request related to a problem? Please describe.

Currently, the participants are unable to set a partition to an ERROR state explicitly when they seem to be stuck in a specific current state. The only way a replica can be set to ERROR is from within a state model. Having an endpoint to allow this behavior would allow the clients to call the resetPartition endpoint to set it back to INIT state and recover the replica. resetPartitions work only on partitions in error state.

Describe the solution you'd like

An API endpoint that validates the incoming request and sends a state transition message to sets one or more partitions from any current state to ERROR state.