junkaixue commented on code in PR #2930:
URL: https://github.com/apache/helix/pull/2930#discussion_r1832931703
##########
helix-core/src/main/java/org/apache/helix/manager/zk/ZkBaseDataAccessor.java:
##########
@@ -423,6 +423,16 @@ public boolean update(String path, DataUpdater<T> updater,
int options) {
* sync update
*/
public AccessResult doUpdate(String path, DataUpdater<T> updater, int
options) {
+ return doUpdate(path, updater, options, ZkClient.TTL_NOT_SET);
+ }
+
+ /**
+ * sync update with ttl
+ *
+ * ttl is only used when creating new znode, hence if znode is already
created with a ttl, further
+ * update operations will not update the znode ttl even if ttl is provided
in the options
+ */
+ public AccessResult doUpdate(String path, DataUpdater<T> updater, int
options, long ttl) {
Review Comment:
+1 on @xyuanlu.
I can understand TTL for create. But why we need TTL for update? The right
operation is to let the user delete the node and recreate with a TTL.
I am not confortable with this feature. Before we have strong justification.
I dont think we should let this in.
@jacoblukose It would be good to figure out why you would like to support
this.
--
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]