You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@helix.apache.org by jx...@apache.org on 2018/10/29 23:44:25 UTC
helix git commit: Improve the logic for Task Context update
Repository: helix
Updated Branches:
refs/heads/master 67aade646 -> 281f5d1ec
Improve the logic for Task Context update
In one batch of contexts update, Helix does not need to persist back the data to ZK if it is ready to remove in the same round.
Project: http://git-wip-us.apache.org/repos/asf/helix/repo
Commit: http://git-wip-us.apache.org/repos/asf/helix/commit/281f5d1e
Tree: http://git-wip-us.apache.org/repos/asf/helix/tree/281f5d1e
Diff: http://git-wip-us.apache.org/repos/asf/helix/diff/281f5d1e
Branch: refs/heads/master
Commit: 281f5d1ec8edf323877f547f8d1579dfc2c0b322
Parents: 67aade6
Author: Junkai Xue <jx...@linkedin.com>
Authored: Mon Sep 17 18:13:44 2018 -0700
Committer: Junkai Xue <jx...@linkedin.com>
Committed: Mon Oct 29 16:44:16 2018 -0700
----------------------------------------------------------------------
.../main/java/org/apache/helix/common/caches/TaskDataCache.java | 2 ++
1 file changed, 2 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/helix/blob/281f5d1e/helix-core/src/main/java/org/apache/helix/common/caches/TaskDataCache.java
----------------------------------------------------------------------
diff --git a/helix-core/src/main/java/org/apache/helix/common/caches/TaskDataCache.java b/helix-core/src/main/java/org/apache/helix/common/caches/TaskDataCache.java
index f8995f6..5d39512 100644
--- a/helix-core/src/main/java/org/apache/helix/common/caches/TaskDataCache.java
+++ b/helix-core/src/main/java/org/apache/helix/common/caches/TaskDataCache.java
@@ -210,6 +210,8 @@ public class TaskDataCache extends AbstractDataCache {
// Flush Context
List<String> contextUpdatePaths = new ArrayList<>();
List<ZNRecord> contextUpdateData = new ArrayList<>();
+ // Do not update it if the is need to be remove
+ _contextToUpdate.removeAll(_contextToRemove);
List<String> contextUpdateNames = new ArrayList<>(_contextToUpdate);
for (String resourceName : contextUpdateNames) {
if (_contextMap.get(resourceName) != null && !_contextToRemove.contains(resourceName)) {