[
https://issues.apache.org/jira/browse/ZOOKEEPER-4690?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17717361#comment-17717361
]
Ryan Ruel commented on ZOOKEEPER-4690:
--------------------------------------
Here is a simple example:
{noformat}
[zk: 100.80.2.1:2281(CONNECTED) 1] create -t 300 /foobar
Created /foobar
[zk: 100.80.2.1:2281(CONNECTED) 2] get -s /foobar
null
cZxid = 0x1000008c0
ctime = Thu Apr 27 19:51:59 UTC 2023
mZxid = 0x1000008c0
mtime = Thu Apr 27 19:51:59 UTC 2023
pZxid = 0x1000008c0
cversion = 0
dataVersion = 0
aclVersion = 0
ephemeralOwner = 0x0
dataLength = 0
numChildren = 0
[zk: 100.80.2.1:2281(CONNECTED) 3]{noformat}
As you can see, the ephemeralOwner field is 0x0 here, even though the ZNode is
created with a TTL.
Are you suggesting another way to access this field?
> 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)