[ 
https://issues.apache.org/jira/browse/OAK-9469?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Miroslav Smiljanic updated OAK-9469:
------------------------------------
    Attachment: OAK-9469_test.patch

> Unsuccessful lease refresh in AzureRepositoryLock can cause two processes 
> using Oak to have write access 
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: OAK-9469
>                 URL: https://issues.apache.org/jira/browse/OAK-9469
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>            Reporter: Miroslav Smiljanic
>            Assignee: Miroslav Smiljanic
>            Priority: Major
>         Attachments: OAK-9469_test.patch
>
>
> Lease for *repo.lock* is initially 
> [requested|https://github.com/apache/jackrabbit-oak/blob/jackrabbit-oak-1.40.0/oak-segment-azure/src/main/java/org/apache/jackrabbit/oak/segment/azure/AzureRepositoryLock.java#L68]
>  for period of 60 seconds, and later it is being periodically 
> [renewed|https://github.com/apache/jackrabbit-oak/blob/jackrabbit-oak-1.40.0/oak-segment-azure/src/main/java/org/apache/jackrabbit/oak/segment/azure/AzureRepositoryLock.java#L95]
>  in the separate thread. 
> Renewal of the lease can be unsuccessful, when StorageException is being 
> thrown, and shutdown hook being 
> [invoked|https://github.com/apache/jackrabbit-oak/blob/jackrabbit-oak-1.40.0/oak-segment-azure/src/main/java/org/apache/jackrabbit/oak/segment/azure/AzureRepositoryLock.java#L107].
>  
> Shutdown hood defined in AzurePersistence is basically AzurePersistence NOOP 
> that only prints warning log message. Process running Oak will continue to 
> run.
> Later the other process running Oak can try to acquire the same lock and will 
> be able to do it. From that moment two processes might have write access over 
> the remote repo, and cause conflicts to each other. 
> Test case that demonstrates the issue in  AzureRepositoryLock:  
> [^OAK-OAK-9469_test.patch] 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to