apache / helix

Mirror of Apache Helix
Apache License 2.0
461 stars 224 forks source link

Replace the HELIX_ENABLED config with InstanceOperation while maintaining backwards compatibility with old APIs #2772

Closed zpinto closed 4 months ago

zpinto commented 6 months ago

Issues

Description

In order to unify HELIX_ENABLED functionality with InstanceOperation, InstanceOperation will now have the following options:

SWAP_IN will not be able to be set to DISABLE, since the SWAP_IN instance is not in the routing table it should not require a graceful way to move replicas to OFFLINE state.

Tests

Changes that Break Backward Compatibility (Optional)

Will maintain backwards compatibility.

To replace the HELIX_ENABLED config with InstanceOperation while maintaining backwards compatibility with old APIs we keep the behavior where helix will treat the instance as disabled if HELIX_ENABLED is set to false with the exception of SWAP_IN. If it is set to true, the controller will treat the instance based on the InstanceOperation that is set. All users on an old version of helix will be able to continue using HelixAdmin().enableInstance with the same behavior. Users on the latest version will be able to leverage the new APIs to do new operations available.

Commits

Code Quality

zpinto commented 4 months ago

This PR is ready to be merged!

Final Commit Message:

Replace the HELIX_ENABLED config with InstanceOperation while maintaining backwards compatibility with old APIs.

In order to unify HELIX_ENABLED functionality with InstanceOperation, InstanceOperation will now have the following options: ENABLE, DISABLE, EVACUATE, SWAP_IN, UNKNOWN