Wire in the logic for TaskExecutor reset timeout parameter#2176
Wire in the logic for TaskExecutor reset timeout parameter#2176qqu0127 wants to merge 2 commits intoapache:masterfrom
Conversation
Pass down the parameter from HelixManagerFactorye down to HelixTaskExecutor so that helix users can specify
helix-core/src/main/java/org/apache/helix/HelixManagerFactory.java
Outdated
Show resolved
Hide resolved
helix-core/src/main/java/org/apache/helix/HelixManagerProperty.java
Outdated
Show resolved
Hide resolved
helix-core/src/main/java/org/apache/helix/messaging/DefaultMessagingService.java
Outdated
Show resolved
Hide resolved
helix-core/src/test/java/org/apache/helix/integration/manager/TestParticipantManager.java
Show resolved
Hide resolved
There was a problem hiding this comment.
As I said, I don't think HelixManagerProperty is the best place to store the reset timeout - the problem is not with your design, but unfortunately our existing logic will cause confusions to customers; without changing the existing logic, that's not the best place.
The customer did talk about storing the reset timeout in ClusterConfig, and I think that's a better choice. Can we load the config automatically from ClusterConfig, and not modify the HelixManager initialization?
helix-core/src/main/java/org/apache/helix/HelixManagerFactory.java
Outdated
Show resolved
Hide resolved
helix-core/src/main/java/org/apache/helix/HelixManagerProperty.java
Outdated
Show resolved
Hide resolved
helix-core/src/main/java/org/apache/helix/messaging/DefaultMessagingService.java
Outdated
Show resolved
Hide resolved
|
You'll need to modify more logic to enable the constructor with both zk address and helix manager property. Please take a look at this PR, its purpose was to add a constructor like that. |
Thanks @mgao0 for the pointer. Is this the same thing Neal mentioned? I feel if we make sure |
I saw your latest commit that added zkAddr to HelixManagerProperty, it makes sense. |
Issues
Fix Enable setting msgHandlerResetTimeout through HelixManagerFactory #2175
Description
The timeout logic introduced in Make theadpool shutdown timeout configurable for the HelixTaskExecutor. #1920, failed to provide a client side entry point. As a followup, this PR address the issue by passing down the parameter from HelixManagerFactory down to HelixTaskExecutor so that helix users can specify.
The parameter is encapsulated in HelixManagerProperty to enable client to specify value and pass down from HelixManagerFactory
Update:
We add zkAddr to HelixManagerProperty and parameter validation to resolve param conflicts. Rollback the new constructor in HelixManagerFactory.
Validations in two places:
With above two checks, we can ensure: if ZkConnectionConfig is set => the zkAddress must be null, either from HelixManagerProperty or from ZKHelixManager.
We set higher precedence for zkAddr from HelixManagerProperty, if this is empty, zkAddress passed from constructor is used.
Tests
The following tests are written for this issue:
Modified existing test case in TestParticipantManager.java
The following is the result of the "mvn test" command on the appropriate module:
(If CI test fails due to known issue, please specify the issue and test PR locally. Then copy & paste the result of "mvn test" to here.)
Changes that Break Backward Compatibility (Optional)
(Consider including all behavior changes for public methods or API. Also include these changes in merge description so that other developers are aware of these changes. This allows them to make relevant code changes in feature branches accounting for the new method/API behavior.)
Documentation (Optional)
(Link the GitHub wiki you added)
Commits
Code Quality
(helix-style-intellij.xml if IntelliJ IDE is used)