Fix PersistentTtlNode not deleted if touch node is never created#1260
Fix PersistentTtlNode not deleted if touch node is never created#1260kezhuw merged 10 commits intoapache:masterfrom
Conversation
kezhuw
left a comment
There was a problem hiding this comment.
Thank you for your contribution!
Looks good in general. I left a comment about the way to inject code for testing purpose.
kezhuw
left a comment
There was a problem hiding this comment.
Would you want to take another look ? @tisonkun @eolivelli @Randgalt
It has been raised before in CURATOR-545, but end up in a fix in zookeeper side ZOOKEEPER-3546.
Given the fact that PERSISTENT_WITH_TTL is capable as CONTAINER node(see also
apache/zookeeper#1138 (comment)). I think we could create the container node with using PERSISTENT_WITH_TTL so we can fix this without reconfig server cluster.
Ideally, there sould be a "touch" command to modify "mtime" of PERSISTENT_WITH_TTL. Sadly, we don't have, so the child touch node still sound good to me as it does not setData on container node after creation.
Co-authored-by: Kezhu Wang <[email protected]>
This closes #1258 .
Thanks to Kezhu Wang for the suggestion in the solution