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 "Michael Dürig (JIRA)" <ji...@apache.org> on 2012/06/28 17:22:44 UTC

[jira] [Created] (OAK-156) Observation events need Session.refresh

Michael Dürig created OAK-156:
---------------------------------

             Summary: Observation events need Session.refresh
                 Key: OAK-156
                 URL: https://issues.apache.org/jira/browse/OAK-156
             Project: Jackrabbit Oak
          Issue Type: Sub-task
            Reporter: Michael Dürig


The observation design from OAK-144 does not deliver events from revisions which are ahead of the revision on which the current session is based. A call to session.refresh or session.save will cause such events to be dispatched. 

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

       

[jira] [Commented] (OAK-156) Observation events need Session.refresh

Posted by "Michael Dürig (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OAK-156?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13422221#comment-13422221 ] 

Michael Dürig commented on OAK-156:
-----------------------------------

Assuming lazy consensus I'm going to apply a cleaned up version of the patch.
                
> Observation events need Session.refresh
> ---------------------------------------
>
>                 Key: OAK-156
>                 URL: https://issues.apache.org/jira/browse/OAK-156
>             Project: Jackrabbit Oak
>          Issue Type: Sub-task
>            Reporter: Michael Dürig
>            Assignee: Michael Dürig
>             Fix For: 0.4
>
>         Attachments: OAK-156.patch
>
>
> The observation design from OAK-144 does not deliver events from revisions which are ahead of the revision on which the current session is based. A call to session.refresh or session.save will cause such events to be dispatched. 

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

       

[jira] [Resolved] (OAK-156) Observation events need Session.refresh

Posted by "Michael Dürig (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OAK-156?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Dürig resolved OAK-156.
-------------------------------

       Resolution: Fixed
    Fix Version/s: 0.4

Fixed at revision 1359763
                
> Observation events need Session.refresh
> ---------------------------------------
>
>                 Key: OAK-156
>                 URL: https://issues.apache.org/jira/browse/OAK-156
>             Project: Jackrabbit Oak
>          Issue Type: Sub-task
>            Reporter: Michael Dürig
>            Assignee: Michael Dürig
>             Fix For: 0.4
>
>
> The observation design from OAK-144 does not deliver events from revisions which are ahead of the revision on which the current session is based. A call to session.refresh or session.save will cause such events to be dispatched. 

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

       

[jira] [Commented] (OAK-156) Observation events need Session.refresh

Posted by "Jukka Zitting (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OAK-156?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13403163#comment-13403163 ] 

Jukka Zitting commented on OAK-156:
-----------------------------------

I'd solve this by having a timer periodically refresh() a session that has registered an observation listener.
                
> Observation events need Session.refresh
> ---------------------------------------
>
>                 Key: OAK-156
>                 URL: https://issues.apache.org/jira/browse/OAK-156
>             Project: Jackrabbit Oak
>          Issue Type: Sub-task
>            Reporter: Michael Dürig
>
> The observation design from OAK-144 does not deliver events from revisions which are ahead of the revision on which the current session is based. A call to session.refresh or session.save will cause such events to be dispatched. 

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

       

[jira] [Assigned] (OAK-156) Observation events need Session.refresh

Posted by "Michael Dürig (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OAK-156?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Dürig reassigned OAK-156:
---------------------------------

    Assignee: Michael Dürig
    
> Observation events need Session.refresh
> ---------------------------------------
>
>                 Key: OAK-156
>                 URL: https://issues.apache.org/jira/browse/OAK-156
>             Project: Jackrabbit Oak
>          Issue Type: Sub-task
>            Reporter: Michael Dürig
>            Assignee: Michael Dürig
>             Fix For: 0.4
>
>
> The observation design from OAK-144 does not deliver events from revisions which are ahead of the revision on which the current session is based. A call to session.refresh or session.save will cause such events to be dispatched. 

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

       

[jira] [Resolved] (OAK-156) Observation events need Session.refresh

Posted by "Michael Dürig (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OAK-156?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Dürig resolved OAK-156.
-------------------------------

    Resolution: Fixed

Fixed at revision 1365564. Revision 1365565 updates the relevant test exclusions. 
                
> Observation events need Session.refresh
> ---------------------------------------
>
>                 Key: OAK-156
>                 URL: https://issues.apache.org/jira/browse/OAK-156
>             Project: Jackrabbit Oak
>          Issue Type: Sub-task
>            Reporter: Michael Dürig
>            Assignee: Michael Dürig
>             Fix For: 0.4
>
>         Attachments: OAK-156.patch
>
>
> The observation design from OAK-144 does not deliver events from revisions which are ahead of the revision on which the current session is based. A call to session.refresh or session.save will cause such events to be dispatched. 

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

       

[jira] [Commented] (OAK-156) Observation events need Session.refresh

Posted by "Michael Dürig (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OAK-156?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13410514#comment-13410514 ] 

Michael Dürig commented on OAK-156:
-----------------------------------

In revision 1359763 I added a refresh call each time before the observation events are calculated. Since the refresh call happens from another thread, I had to synchronize access to the {{Root}} instance in {{SessionDelegate}}. Currently this is done through explicit synchronisation on the {{Root}} instance's object monitor. The result of which is that concurrent read access within the same session will also be synchronised to some degree. If this turns out to lead to contentions, we could change the synchronisation mechanism to use some sort of a read write lock.
                
> Observation events need Session.refresh
> ---------------------------------------
>
>                 Key: OAK-156
>                 URL: https://issues.apache.org/jira/browse/OAK-156
>             Project: Jackrabbit Oak
>          Issue Type: Sub-task
>            Reporter: Michael Dürig
>             Fix For: 0.4
>
>
> The observation design from OAK-144 does not deliver events from revisions which are ahead of the revision on which the current session is based. A call to session.refresh or session.save will cause such events to be dispatched. 

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

       

[jira] [Commented] (OAK-156) Observation events need Session.refresh

Posted by "Jukka Zitting (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OAK-156?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13410521#comment-13410521 ] 

Jukka Zitting commented on OAK-156:
-----------------------------------

bq. The result of which is that concurrent read access within the same session will also be synchronised to some degree.

I don't see that as much of a problem. A client can always open more sessions if needed to increase throughput.
                
> Observation events need Session.refresh
> ---------------------------------------
>
>                 Key: OAK-156
>                 URL: https://issues.apache.org/jira/browse/OAK-156
>             Project: Jackrabbit Oak
>          Issue Type: Sub-task
>            Reporter: Michael Dürig
>            Assignee: Michael Dürig
>             Fix For: 0.4
>
>
> The observation design from OAK-144 does not deliver events from revisions which are ahead of the revision on which the current session is based. A call to session.refresh or session.save will cause such events to be dispatched. 

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

       

[jira] [Commented] (OAK-156) Observation events need Session.refresh

Posted by "Michael Dürig (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OAK-156?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13411593#comment-13411593 ] 

Michael Dürig commented on OAK-156:
-----------------------------------

Turns out that synchronising on the {{Root}} instance in {{SessionDelegate}} is not enough. In order to make this work we need to synchronise virtually every method which accesses the tree in order to not see a partially refreshed tree. Doesn't sound like a good solution to me...
                
> Observation events need Session.refresh
> ---------------------------------------
>
>                 Key: OAK-156
>                 URL: https://issues.apache.org/jira/browse/OAK-156
>             Project: Jackrabbit Oak
>          Issue Type: Sub-task
>            Reporter: Michael Dürig
>            Assignee: Michael Dürig
>             Fix For: 0.4
>
>
> The observation design from OAK-144 does not deliver events from revisions which are ahead of the revision on which the current session is based. A call to session.refresh or session.save will cause such events to be dispatched. 

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

       

[jira] [Updated] (OAK-156) Observation events need Session.refresh

Posted by "Michael Dürig (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OAK-156?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Dürig updated OAK-156:
------------------------------

    Attachment: OAK-156.patch

This patch implements another solution to solve this: wrapping session calls into a SessionOperation which provides the necessary context for calling refresh when necessary. This is basically the same solution we also have in Jackrabbit 2 for handling read/write concurrency. So it might also come in handy for other problems further down the line.

The patch is very raw and needs further cleaning up. However it demonstrates the idea for further discussion. 
                
> Observation events need Session.refresh
> ---------------------------------------
>
>                 Key: OAK-156
>                 URL: https://issues.apache.org/jira/browse/OAK-156
>             Project: Jackrabbit Oak
>          Issue Type: Sub-task
>            Reporter: Michael Dürig
>            Assignee: Michael Dürig
>             Fix For: 0.4
>
>         Attachments: OAK-156.patch
>
>
> The observation design from OAK-144 does not deliver events from revisions which are ahead of the revision on which the current session is based. A call to session.refresh or session.save will cause such events to be dispatched. 

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

       

[jira] [Commented] (OAK-156) Observation events need Session.refresh

Posted by "Michael Dürig (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OAK-156?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13411551#comment-13411551 ] 

Michael Dürig commented on OAK-156:
-----------------------------------

In revision 1360185 I reverted my changes from revision 1359763 until we have a better solution.
                
> Observation events need Session.refresh
> ---------------------------------------
>
>                 Key: OAK-156
>                 URL: https://issues.apache.org/jira/browse/OAK-156
>             Project: Jackrabbit Oak
>          Issue Type: Sub-task
>            Reporter: Michael Dürig
>            Assignee: Michael Dürig
>             Fix For: 0.4
>
>
> The observation design from OAK-144 does not deliver events from revisions which are ahead of the revision on which the current session is based. A call to session.refresh or session.save will cause such events to be dispatched. 

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

       

[jira] [Reopened] (OAK-156) Observation events need Session.refresh

Posted by "Michael Dürig (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OAK-156?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Dürig reopened OAK-156:
-------------------------------


Reopening since my "fix" in revision 1359763 does not correctly synchronise concurrent access to the tree which result in observation tests to sporadically fail. 
                
> Observation events need Session.refresh
> ---------------------------------------
>
>                 Key: OAK-156
>                 URL: https://issues.apache.org/jira/browse/OAK-156
>             Project: Jackrabbit Oak
>          Issue Type: Sub-task
>            Reporter: Michael Dürig
>            Assignee: Michael Dürig
>             Fix For: 0.4
>
>
> The observation design from OAK-144 does not deliver events from revisions which are ahead of the revision on which the current session is based. A call to session.refresh or session.save will cause such events to be dispatched. 

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