Skip to content

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

Merged
kezhuw merged 10 commits into
apache:masterfrom
chevaris:ISSUE-1258
Apr 8, 2025
Merged

Fix PersistentTtlNode not deleted if touch node is never created#1260
kezhuw merged 10 commits into
apache:masterfrom
chevaris:ISSUE-1258

Conversation

@chevaris

@chevaris chevaris commented Apr 1, 2025

Copy link
Copy Markdown
Contributor

This closes #1258 .

Thanks to Kezhu Wang for the suggestion in the solution

@kezhuw kezhuw left a comment

Copy link
Copy Markdown
Member

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

kezhuw commented Apr 1, 2025

Copy link
Copy Markdown
Member

@kezhuw kezhuw left a comment

Copy link
Copy Markdown
Member

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.

@kezhuw kezhuw left a comment

Copy link
Copy Markdown
Member

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 <kezhuw@gmail.com>

@tisonkun tisonkun left a comment

Copy link
Copy Markdown
Member

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