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

Julian Reschke edited comment on OAK-3439 at 9/23/15 2:22 PM:
--------------------------------------------------------------

Proposal (ack [~mreutegg]): use a revisioned modcount property (with a fixed 
revision) and then do the update operation using UpdateOp's support for 
conditional updates.

*Update* it seems we don't need a revision property after all. We can just use 
{{UpdateOp.equals()}} to check whether {{RecoveryLockState == NONE}}.


was (Author: reschke):
Proposal (ack [~mreutegg]): use a revisioned modcount property (with a fixed 
revision) and then do the update operation using UpdateOp's support for 
conditional updates.

> MissingLastRevSeeker potential race condition acquiring the lock
> ----------------------------------------------------------------
>
>                 Key: OAK-3439
>                 URL: https://issues.apache.org/jira/browse/OAK-3439
>             Project: Jackrabbit Oak
>          Issue Type: Task
>          Components: core, rdbmk
>            Reporter: Julian Reschke
>
> {code}
>             // This approach has a race condition where two different cluster
>             // nodes
>             // can acquire the lock simultaneously.
>             UpdateOp update = new UpdateOp(Integer.toString(clusterId), true);
>             update.set(ClusterNodeInfo.REV_RECOVERY_LOCK, 
> RecoverLockState.ACQUIRED.name());
>             store.createOrUpdate(Collection.CLUSTER_NODES, update);
>             return true;
> {code}
> It would be good if could harden this, however it seems that the conditions 
> in UpdateOp only work on revision properties. [~mreutegg] WDYT?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to