jackrabbit-oak-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christan Keller (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (OAK-6170) Checkin function doesn't verify the node is locked when checkout does
Date Tue, 19 Jun 2018 14:55:00 GMT

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

Christan Keller edited comment on OAK-6170 at 6/19/18 2:54 PM:
---------------------------------------------------------------

The problem is:

Take a Session S that can't unlock.
{panel}
{code:java}
Node n = S.getNode(path)
n.setProperty("a", "b") <-- No exception (spec violation)
s.save() <-- No excpetion
VersionManger.checkin (n.getPath()); <-- No Exception
n.setPropety("newProp", "new version"); <- VersionException(Node checked in){code}
{panel}
 * session can't recover from checked-in state.   
 * api user can't recover from having changed its intended changes only partially 


was (Author: chkeller):
The problem is:

Take a Session S that can't unlock.

{panel}
Node n = S.getNode(path)

n.setProperty("a", "b") <-- No exception (spec violation)

s.save() <-- No excpetion

VersionManger.checkin (n.getPath()); <-- No Exception

n.setPropety("newProp", "new version"); <- VersionException(Node checked in)

{panel}
* session can't recover from checked-in state.   
* api user can't recover from having changed its intended changes only partially 

> Checkin function doesn't verify the node is locked when checkout does
> ---------------------------------------------------------------------
>
>                 Key: OAK-6170
>                 URL: https://issues.apache.org/jira/browse/OAK-6170
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: core, jcr
>    Affects Versions: 1.2.25
>            Reporter: Patrick Fauchere
>            Priority: Major
>
> Steps to reproduce
> # User A locks a node
> # User B creates a version of this node (checking that node in)
> Result: User A cannot edit the node. User B cannot check-out that node.
> Workaround: User A must unlock the node then User B can do the check-out.
> We may want to verify the node can be unlocked by the user the same way it is done with
the _checkout_ function [0,1] before doing the actual _checkin_.
> [0] https://github.com/apache/jackrabbit-oak/blob/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/version/VersionManagerImpl.java#L343-L374
> [1] https://github.com/apache/jackrabbit-oak/blob/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/version/VersionManagerImpl.java#L391



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message