[
https://issues.apache.org/jira/browse/BOOKKEEPER-879?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15052582#comment-15052582
]
Enrico Olivelli commented on BOOKKEEPER-879:
--------------------------------------------
if we keep mtime inside LedgerMetadata, so not reading from znode, it has to be
updated every time that LedgerMetadata change, I don't know Bookkeeper
internals very much, but I think that it is a non trivial implementation
because we need to decide which mutation changes the mtime.
Otherwise we can update it at every update on the znode (before calling
writeLedgerMetadata or inside writeLedgerMetadata?) but the value that we are
going to write will be different from the value that the caller is requesting
to be written.
I don't known how to handle isConflictWith for changes on mtime
honestly I would prefer to leave mtime to another issue and implement only
ctime either as serialized LedgerMetadata field or as derived LedgerMetadata
field (read from znode and passed to the parseConfig method)
I we use the znode-only approach new clients will be able to known ctime for
old ledgers and this feature for me will be very valuable (because I have in
production thousands of ledgers)
> Record ledger creation time
> ---------------------------
>
> Key: BOOKKEEPER-879
> URL: https://issues.apache.org/jira/browse/BOOKKEEPER-879
> Project: Bookkeeper
> Issue Type: New Feature
> Components: bookkeeper-client, bookkeeper-server
> Affects Versions: 4.3.1
> Reporter: Enrico Olivelli
>
> I think that a creation timestamp would be very useful and it does not cost
> very much. It would be an immutable value.
> Nowadays (on 4.3.1) I must keep that info together with the id of the ledger,
> for instance in zookeeper, but if that reference gets lost there is now way
> to know how old a ledger is.
> I think that this timestamp should be captured on client while calling
> createLedger or asyncCreateLedger.
> In addition to this very common field maybe it would be useful to add a
> custom byte[] field named "custom client data" in order to let the client
> 'describe' the ledger without the need of extra data on Zookeeper.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)