[
https://issues.apache.org/jira/browse/ZOOKEEPER-4690?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17716670#comment-17716670
]
Ryan Ruel commented on ZOOKEEPER-4690:
--------------------------------------
[~kezhuw],
Correct, this information is available in the internal data structures.
However, it's not available from external APIs (or the CLI tool).
I haven't dug TOO far into it yet, but it appeared to me from EphemeralOwner
that the TTL feature was implemented as an extended feature bit, and it seems
those are masked before being exposed to the user.
Therefore just looking at the ephemeralOwner field returned by the public API
(say, using "get -s" in the CLI tool) doesn't expose the information.
> Expose TTL ZNode information
> ----------------------------
>
> Key: ZOOKEEPER-4690
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-4690
> Project: ZooKeeper
> Issue Type: Improvement
> Components: server
> Affects Versions: 3.7.1
> Reporter: Ryan Ruel
> Priority: Minor
>
> When a ZNode is created with a TTL, there is currently no way to later read
> the ZNode and determine:
> 1. Is the ZNode configured with a TTL?
> 2. When will the TTL expire?
> This information could be useful, for example, where applications need to
> resurrect TTL-based tombstones into persistent ZNodes. Additionally, it would
> be useful for debugging via the CLI utility.
> I would expect this information to be available via the Stat object.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)