You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@helix.apache.org by "junkaixue (via GitHub)" <gi...@apache.org> on 2023/08/30 00:13:22 UTC
[GitHub] [helix] junkaixue commented on a diff in pull request #2600: [apache/helix] -- Fixes #2596 Removed usage of FJP in identification of missing active node.
junkaixue commented on code in PR #2600:
URL: https://github.com/apache/helix/pull/2600#discussion_r1309467652
##########
helix-core/src/main/java/org/apache/helix/controller/rebalancer/waged/WagedRebalancer.java:
##########
@@ -450,22 +452,17 @@ protected Map<String, ResourceAssignment> emergencyRebalance(
resourceMap.keySet());
// Step 1: Check for permanent node down
- AtomicBoolean allNodesActive = new AtomicBoolean(true);
- currentBestPossibleAssignment.values().parallelStream().forEach((resourceAssignment -> {
- resourceAssignment.getMappedPartitions().parallelStream().forEach(partition -> {
- for (String instance : resourceAssignment.getReplicaMap(partition).keySet()) {
- if (!activeNodes.contains(instance)) {
- allNodesActive.set(false);
- break;
- }
- }
- });
- }));
-
+ boolean allNodesActive = currentBestPossibleAssignment.values().stream()
Review Comment:
Do we know the real root case? Although Atomic can block the parallel calls. But it should finish very fast and not generate more thread?
--
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