-
Notifications
You must be signed in to change notification settings - Fork 228
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deprecate HELIX_DISABLED_REASON and refactor how InstanceOperation is represented in instance configs. #2801
Deprecate HELIX_DISABLED_REASON and refactor how InstanceOperation is represented in instance configs. #2801
Conversation
helix-core/src/main/java/org/apache/helix/controller/stages/BestPossibleStateCalcStage.java
Show resolved
Hide resolved
HELIX_HOST, | ||
HELIX_PORT, | ||
HELIX_ZONE_ID, | ||
@Deprecated | ||
HELIX_ENABLED, | ||
HELIX_ENABLED_TIMESTAMP, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we deprecate enable field, then we should deprecate enable timestamp and add a new entry for operation timestamp as a list.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should still keep HELIX_ENABLED_TIMESTAMP so re-enabling or disabling it when it is already in that state does not reset the delay window. Let's discuss this more offline.
helix-common/src/main/java/org/apache/helix/constants/InstanceConstants.java
Outdated
Show resolved
Hide resolved
helix-common/src/main/java/org/apache/helix/constants/InstanceConstants.java
Outdated
Show resolved
Hide resolved
helix-common/src/main/java/org/apache/helix/constants/InstanceConstants.java
Outdated
Show resolved
Hide resolved
helix-core/src/main/java/org/apache/helix/cloud/event/helix/DefaultCloudEventCallbackImpl.java
Outdated
Show resolved
Hide resolved
helix-core/src/main/java/org/apache/helix/model/InstanceConfig.java
Outdated
Show resolved
Hide resolved
helix-core/src/main/java/org/apache/helix/util/InstanceUtil.java
Outdated
Show resolved
Hide resolved
helix-core/src/main/java/org/apache/helix/util/InstanceUtil.java
Outdated
Show resolved
Hide resolved
…N_REASON to be used when setting InstanceOperation to DISABLE or UNKNOWN. This change is backwards compatible with HELIX_DISABLED_REASON.
…. Refactor InstanceOperation to InstanceOperationMap.
3ab0b57
to
5891eac
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job!
This PR is ready to be merged! Final Commit Message
|
Issues
Description
Deprecate HELIX_DISABLED_REASON and HELIX_DISABLED_TYPE and refactor INSTANCE_OPERATION to be HELIX_INSTANCE_OPERATIONS listField.
In order to prevent conflicts from different clients setting the InstanceOperation. We will now introduce the HELIX_INSTANCE_OPERATIONS.
The list will be ordered by the earliest to the most recent operations. As before, any client using the old helix enabled APIs will always take precedence over the INSTANCE_DISABLED_OVERRIDABLE_OPERATIONS when those fields are set.
When users of the new InstanceOperation APIs set the operation type to be DISABLE, we will also set the old HELIX_ENABLED field for backwards compatibility.
For all invocations of InstanceOperation APIs, the source will be USER unless otherwise specified. In most cases, this is the trigger used. If an AUTOMATION source is used a separate entry will made in the list. Whichever non ENABLE InstanceOperation entry was created last is the active InstanceOperation that is used in the controller and the returned from getInstanceOperation API.
Tests
Changes that Break Backward Compatibility (Optional)
Commits
Code Quality
(helix-style-intellij.xml if IntelliJ IDE is used)