You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-commits@jackrabbit.apache.org by mi...@apache.org on 2024/01/05 14:14:12 UTC

(jackrabbit-oak) branch issue/OAK-10594 created (now 266b21dc4f)

This is an automated email from the ASF dual-hosted git repository.

miroslav pushed a change to branch issue/OAK-10594
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git


      at 266b21dc4f OAK-10594 disable Azure writing for all StorageException

This branch includes the following new commits:

     new 266b21dc4f OAK-10594 disable Azure writing for all StorageException

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



(jackrabbit-oak) 01/01: OAK-10594 disable Azure writing for all StorageException

Posted by mi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

miroslav pushed a commit to branch issue/OAK-10594
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git

commit 266b21dc4fb9f42afd1abbaf8ca5e9c29d1e5700
Author: Miroslav Smiljanic <mi...@apache.com>
AuthorDate: Fri Jan 5 15:13:38 2024 +0100

    OAK-10594 disable Azure writing for all StorageException
---
 .../apache/jackrabbit/oak/segment/azure/AzureRepositoryLock.java   | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/oak-segment-azure/src/main/java/org/apache/jackrabbit/oak/segment/azure/AzureRepositoryLock.java b/oak-segment-azure/src/main/java/org/apache/jackrabbit/oak/segment/azure/AzureRepositoryLock.java
index 046fa2643d..943e77a8b2 100644
--- a/oak-segment-azure/src/main/java/org/apache/jackrabbit/oak/segment/azure/AzureRepositoryLock.java
+++ b/oak-segment-azure/src/main/java/org/apache/jackrabbit/oak/segment/azure/AzureRepositoryLock.java
@@ -137,10 +137,11 @@ public class AzureRepositoryLock implements RepositoryLock {
             } catch (StorageException e) {
                 timeSinceLastUpdate = (System.currentTimeMillis() - lastUpdate) / 1000;
 
+                if (timeSinceLastUpdate > timeToWaitBeforeWriteBlock) {
+                    writeAccessController.disableWriting();
+                }
+
                 if (e.getErrorCode().equals(StorageErrorCodeStrings.OPERATION_TIMED_OUT)) {
-                    if (timeSinceLastUpdate > timeToWaitBeforeWriteBlock) {
-                        writeAccessController.disableWriting();
-                    }
                     log.warn("Could not renew the lease due to the operation timeout. Retry in progress ...", e);
                 } else {
                     log.error("Can't renew the lease", e);