You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@helix.apache.org by "jacob-netguardians (via GitHub)" <gi...@apache.org> on 2024/12/06 09:39:22 UTC
[PR] #2965 Atomic ZNode creation on node registration [helix]
jacob-netguardians opened a new pull request, #2978:
URL: https://github.com/apache/helix/pull/2978
### Issues
- [x] My PR addresses the following Helix issues and references them in the PR description:
Fixes #2965
### Description
- [x] Here are some details about my PR, including screenshots of any UI changes:
If two nodes try to register at about the same time in the cluster, there may be a race condition while effectively adding the instances to the cluster description in zookeeper (the second one seeing an incomplete node hierarchy and later on refusing to accept tasks). Having an atomic creation of those nodes in zookeeper should prevent that.
### Tests
- [x] The following tests are written for this issue:
No additional tests.
### Commits
- [x] My commits all reference appropriate Apache Helix GitHub issues in their subject lines. In addition, my commits follow the guidelines from "[How to write a good git commit message](http://chris.beams.io/posts/git-commit/)":
1. Subject is separated from body by a blank line
1. Subject is limited to 50 characters (not including Jira issue reference)
1. Subject does not end with a period
1. Subject uses the imperative mood ("add", not "adding")
1. Body wraps at 72 characters
1. Body explains "what" and "why", not "how"
### Code Quality
- [x] My diff has been formatted using helix-style.xml
(helix-style-intellij.xml if IntelliJ IDE is used)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org
For additional commands, e-mail: reviews-help@helix.apache.org
Re: [PR] #2965 Atomic ZNode creation on node registration [helix]
Posted by "jacob-netguardians (via GitHub)" <gi...@apache.org>.
jacob-netguardians commented on PR #2978:
URL: https://github.com/apache/helix/pull/2978#issuecomment-2528273395
Formatted the code in "helix format". It did not only touch the lines I had modified.
For the test, I am sorry, I do not know how to reproduce the situation in a controlled way in a test.
The problem appeared from time to time in my integration tests, and I already spent a few hours tracking it down to this.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org
For additional commands, e-mail: reviews-help@helix.apache.org
Re: [PR] #2965 Atomic ZNode creation on node registration [helix]
Posted by "junkaixue (via GitHub)" <gi...@apache.org>.
junkaixue commented on code in PR #2978:
URL: https://github.com/apache/helix/pull/2978#discussion_r1878688331
##########
helix-core/src/main/java/org/apache/helix/manager/zk/ZKHelixAdmin.java:
##########
@@ -503,8 +514,8 @@ private boolean canCompleteSwap(String clusterName, String swapOutInstanceName,
if (swapInLiveInstance == null) {
logger.warn(
"SwapOutInstance {} is {} + {} and SwapInInstance {} is OFFLINE + {} for cluster {}. Swap will"
- + " not complete unless SwapInInstance instance is ONLINE.",
- swapOutInstanceName, swapOutLiveInstance != null ? "ONLINE" : "OFFLINE",
+ + " not complete unless SwapInInstance instance is ONLINE.", swapOutInstanceName,
Review Comment:
Suggest not to do entire file reformat, hard for reviewing if it is format change or logical change.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org
For additional commands, e-mail: reviews-help@helix.apache.org
Re: [PR] #2965 Atomic ZNode creation on node registration [helix]
Posted by "jacob-netguardians (via GitHub)" <gi...@apache.org>.
jacob-netguardians commented on code in PR #2978:
URL: https://github.com/apache/helix/pull/2978#discussion_r1879421231
##########
helix-core/src/main/java/org/apache/helix/manager/zk/ZKHelixAdmin.java:
##########
@@ -503,8 +514,8 @@ private boolean canCompleteSwap(String clusterName, String swapOutInstanceName,
if (swapInLiveInstance == null) {
logger.warn(
"SwapOutInstance {} is {} + {} and SwapInInstance {} is OFFLINE + {} for cluster {}. Swap will"
- + " not complete unless SwapInInstance instance is ONLINE.",
- swapOutInstanceName, swapOutLiveInstance != null ? "ONLINE" : "OFFLINE",
+ + " not complete unless SwapInInstance instance is ONLINE.", swapOutInstanceName,
Review Comment:
Should be better now.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org
For additional commands, e-mail: reviews-help@helix.apache.org