jackrabbit-oak-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Dürig (JIRA) <j...@apache.org>
Subject [jira] [Comment Edited] (OAK-387) Clarify behavior/state of Root and Tree after calling ContentSession#close()
Date Fri, 19 Oct 2012 09:06:12 GMT

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

Michael Dürig edited comment on OAK-387 at 10/19/12 9:04 AM:
-------------------------------------------------------------

Currently all {{Tree}} s and {{Root}} s that haven been created from a {{ContentSession}}
stay "valid" after the content session has been closed. So in a way the current behaviour
is closest to "undefined". If we want to change this and make them "invalid" we'd need to
track all {{Root}} s spawned of from a content session and also "close" them once the content
session is closed. Not sure whether that is worth it. What would be the consequences/problems
with either solutions?
                
      was (Author: mduerig):
    Currently all {{Tree}} s and {{Root}} s that haven been created from a {{ContentSession}}
stay "valid" after the content session has been closed. So in a way the current behaviour
is closest to "undefined". If we want to change this and make them "invalid" we'd need to
track all {{Root}}s spawned of from a content session and also "close" them once the content
session is closed. Not sure whether that is worth it. What would be the consequences/problems
with either solutions?
                  
> Clarify behavior/state of Root and Tree after calling ContentSession#close()
> ----------------------------------------------------------------------------
>
>                 Key: OAK-387
>                 URL: https://issues.apache.org/jira/browse/OAK-387
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: core
>            Reporter: angela
>
> quickly discussed this topic with jukka today in the office.
> as far as i know the API contract does currently not specify what happens
> to (the state of) a Root or Tree once the ContentSession has been closed.
> if i am not mistaken, the current implementation would just loose 
> the permissions that were granted to the original subject... but that's
> rather a coincidence (and i didn't test it to verify that's really the case)
> possible solutions could be:
> - upon session closure the root/tree becomes invalid (invalidstate) and throws
> - the root/tree are still valid but doesn't have the original permissions
>   any more -> default permissions for empty-subject would apply
> - ...
> whatever solution we may prefer in the end, i think that API contract should
> state the expected behavior (even if it was "undefined") and we should have tests verifying
the current implementation does what we think it should do.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message