You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@helix.apache.org by GitBox <gi...@apache.org> on 2020/10/05 22:18:16 UTC

[GitHub] [helix] jiajunwang commented on a change in pull request #1066: Prevent parallel controller pipelines run causing two master replicas

jiajunwang commented on a change in pull request #1066:
URL: https://github.com/apache/helix/pull/1066#discussion_r499837626



##########
File path: helix-core/src/main/java/org/apache/helix/HelixProperty.java
##########
@@ -177,6 +178,15 @@ public HelixProperty(ZNRecord record, String id) {
         _record.getEphemeralOwner());
   }
 
+  /*
+   * Only used by Message which needs to be session-aware.
+   */
+  protected HelixProperty(SessionAwareZNRecord record, String id) {
+    _record = record;

Review comment:
       This means the input record will directly be passed to the field. It breaks the original assumption.
   How about doing this,
   
       _record = record instanceof SessionAwareZNRecord? new SessionAwareZNRecord(record, id) : new ZNRecord(record, id);
       _stat = new Stat(_record.getVersion(), _record.getCreationTime(), _record.getModifiedTime(),
           _record.getEphemeralOwner());




----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org
For additional commands, e-mail: reviews-help@helix.apache.org