alirezazamani commented on a change in pull request #1523:
URL: https://github.com/apache/helix/pull/1523#discussion_r520932675



##########
File path: 
helix-core/src/main/java/org/apache/helix/common/caches/TaskDataCache.java
##########
@@ -267,6 +277,10 @@ public void updateWorkflowContext(String resourceName, 
WorkflowContext workflowC
    * Update context of the Workflow or Job
    */
   private void updateContext(String resourceName, ZNRecord record) {
+    if (record != null && _initialContextMapHashcode.containsKey(resourceName)
+        && 
_initialContextMapHashcode.get(resourceName).equals((record.toString().hashCode())))
 {
+      return;
+    }

Review comment:
       @dasahcc @jiajunwang  what do you think about this discussion (This PR 
follows what we discussed to address this issue)? I think the concern is valid 
in theory but not in practice. I think the fact that the input is not random 
and is a String created based on ZNRecord protects us against this issue. 
http://sigpwned.com/2018/08/10/string-hashcode-is-plenty-unique/




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to