Skip to content

Fix PersistentTtlNode not deleted if touch node is never created #1260

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Apr 8, 2025

Conversation

chevaris
Copy link
Contributor

@chevaris chevaris commented Apr 1, 2025

This closes #1258 .

Thanks to Kezhu Wang for the suggestion in the solution

Copy link
Member

@kezhuw kezhuw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@chevaris Thank you for your contribution!

I left some inline comments.

@kezhuw kezhuw changed the title ISSUE 1258 Fix PersistentTtlNode not deleted if touch node is never created Apr 1, 2025
@kezhuw
Copy link
Member

kezhuw commented Apr 1, 2025

Copy link
Member

@kezhuw kezhuw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your contribution!

Looks good in general. I left a comment about the way to inject code for testing purpose.

Copy link
Member

@kezhuw kezhuw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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]>
Copy link
Member

@tisonkun tisonkun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks for your contribution @chevaris!

@kezhuw kezhuw merged commit 3f631ac into apache:master Apr 8, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PersistentTTLNode fails to remove node
3 participants