You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "Flavio Junqueira (JIRA)" <ji...@apache.org> on 2010/12/20 13:15:00 UTC

[jira] Commented: (ZOOKEEPER-959) Last modification time of a bookkeeper ledger

    [ https://issues.apache.org/jira/browse/ZOOKEEPER-959?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12973178#action_12973178 ] 

Flavio Junqueira commented on ZOOKEEPER-959:
--------------------------------------------

One concern I have is how to decide what reference to use for the modification time. As a ledger is distributed across multiple bookies and we don't assume synchronized clocks, we cannot rely upon a single value to reflect the last update time of each bookie. A simpler approach is to use the client time as a reference. 

The next concern is making it fault tolerant. If we are to make it tolerant to crashes of the client writer, then one option is to write to ZooKeeper, but that would impose a significant overhead if we are to modify upon every operation, and the value in ZooKeeper might not be consistent with updates on the bookies.

An alternative to writing to ZooKeeper would be sending a timestamp along with every entry. We can then either store the timestamp with the entry or have the bookie update the timestamp of the ledger on the side. The advantage of storing a timestamp with each entry is that it makes recovering the timestamp of the last written entry straightforward. 

Now, the easiest solution of all would be to have the application tagging an entry with a timestamp before calling addEntry (or asyncAddEntry). To get the last update of a ledger, one just have to read the last entry and parse it. This option would be completely transparent to BK.

> Last modification time of a bookkeeper ledger
> ---------------------------------------------
>
>                 Key: ZOOKEEPER-959
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-959
>             Project: ZooKeeper
>          Issue Type: Improvement
>          Components: contrib-bookkeeper
>            Reporter: dhruba borthakur
>
> I would like to discuss how hard or easy it will be to implement a bookkeeper api that returns the last modification time of a ledger. This is related to ZOOKEEPER-465.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.