You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-dev@jackrabbit.apache.org by "Jukka Zitting (JIRA)" <ji...@apache.org> on 2012/07/04 19:53:34 UTC

[jira] [Comment Edited] (OAK-114) MicroKernel API: specify retention policy for old revisions

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

Jukka Zitting edited comment on OAK-114 at 7/4/12 5:53 PM:
-----------------------------------------------------------

bq. i can't follow this argument

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

{code}
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, ...);
{code}

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 10 minutes and it isn't anymore 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 doing.
                
      was (Author: jukkaz):
    bq. i can't follow this argument

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

{code}
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, ...);
{code}

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 doing.
                  
> 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