jackrabbit-oak-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jukka Zitting (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (OAK-114) MicroKernel API: specify retention policy for old revisions
Date Wed, 04 Jul 2012 17:44:33 GMT

    [ https://issues.apache.org/jira/browse/OAK-114?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13406637#comment-13406637

Jukka Zitting commented on OAK-114:

bq. i can't follow this argument

Here's a snippet of code that illustrates Michael's point:

String revision = mk.getHeadRevision();
mk.commit(...);                  // Could occur in another thread
TimeUnit.MINUTES.sleep(5);       // Could be any delay <10mins, or no delay at all
mk.getNodes("/", revision, ...);

Say the {{revision}} returned from the first call was committed something like an hour ago.
Then by the time the {{getNodes}} call is reached it can be that the garbage collector has
already removed that revision since it's already older than 10ms and it isn't the latest revision
in the repository.

If that problem isn't fixed, a client can't make any reasonable assumptions about how long
it can expect a particular revision to stay alive. The only way for a client to guarantee
that it can see a given revision for at least the next 10 minutes would be for it to directly
commit that revision, but that's definitely not something we want read-only clients to be
> MicroKernel API: specify retention policy for old revisions
> -----------------------------------------------------------
>                 Key: OAK-114
>                 URL: https://issues.apache.org/jira/browse/OAK-114
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: mk
>            Reporter: Stefan Guggisberg
>            Assignee: Stefan Guggisberg
>         Attachments: OAK-114.patch
> the MicroKernel API javadoc should specify the minimal guaranteed retention period for
old revisions. 

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


View raw message