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:
[email protected]



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

Reply via email to