xyuanlu commented on code in PR #2930: URL: https://github.com/apache/helix/pull/2930#discussion_r1847639278
########## 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: To be honest I think more time is needed when design the ZK update API to keep consistency. I dont have an solid idea in mind how. But I think the fundamental rule is keep the behavior simple, consistent and not ambiguous. - The Update API has a TTL value, but the result is - the ZNode may or may not have the passed in TTL value, is not a simple and consistent behavior. However, I don't have an idea of how to achieve this, I think this is the reason why we don't have update with TTL in the first place. More effort is needed when design this - if ever needed. -- 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: reviews-unsubscr...@helix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@helix.apache.org For additional commands, e-mail: reviews-h...@helix.apache.org