junkaixue commented on code in PR #2072:
URL: https://github.com/apache/helix/pull/2072#discussion_r861108847


##########
helix-core/src/main/java/org/apache/helix/HelixProperty.java:
##########
@@ -156,25 +156,49 @@ public String toString() {
    * @param id
    */
   public HelixProperty(String id) {
-    this(new ZNRecord(id), id);
+    this(new ZNRecord(id), id, false);
   }
 
   /**
    * Initialize the property with an existing ZNRecord
-   * @param record
+   * @param record the record is cloned, updates to this record will not be 
reflected by the HelixProperty
    */
   public HelixProperty(ZNRecord record) {
-    this(record, record.getId());
+    this(record, true);
   }
 
   /**
-   * Initialize the property with an existing ZNRecord with new record id
+   * Initialize the property with an existing ZNRecord
    * @param record
+   * @param clone set to true to make a copy of the ZNRecord, false otherwise
+   */
+  public HelixProperty(ZNRecord record, boolean clone) {

Review Comment:
   NIT: Let's have a more clear naming for this. "clone" is a little bit 
confusing. Could be enableDeepCopy or something else.



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

To unsubscribe, e-mail: [email protected]

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