helix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hu...@apache.org
Subject [helix] 03/10: Fix read previous assignment for workflows
Date Thu, 28 Mar 2019 19:31:47 GMT
This is an automated email from the ASF dual-hosted git repository.

hulee pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/helix.git

commit 6e94d97a7a490bcf430bff34077b18324fe36751
Author: Hunter Lee <hulee@linkedin.com>
AuthorDate: Thu Mar 28 12:26:21 2019 -0700

    Fix read previous assignment for workflows
    
    With this change, TaskDataCache will:
    1. Not pollute the log with read failures for previous assignment
    2. Reduce the amount of reads from the previous assignment
---
 .../src/main/java/org/apache/helix/common/caches/TaskDataCache.java  | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

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 84145f9..31319ca 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
@@ -172,7 +172,10 @@ public class TaskDataCache extends AbstractDataCache {
     }
     for (String resourceName : childNames) {
       contextPaths.add(getTaskDataPath(resourceName, TaskDataType.CONTEXT));
-      prevAssignmentPaths.add(getTaskDataPath(resourceName, TaskDataType.PREV_ASSIGNMENT));
+      //Workflow does not have previous assignment
+      if (!_workflowConfigMap.containsKey(resourceName)) {
+        prevAssignmentPaths.add(getTaskDataPath(resourceName, TaskDataType.PREV_ASSIGNMENT));
+      }
     }
 
     List<ZNRecord> contexts = accessor.getBaseDataAccessor().get(contextPaths, null,
0);


Mime
View raw message