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

Miroslav Smiljanic updated OAK-12039:
-------------------------------------
    Description: 
When the Azure lease renewal times out on the client side (reactor 
IllegalStateException wrapping TimeoutException), the current exception 
handling treats it as a fatal error and triggers shutdown, even though this is 
a transient condition that should be retried. The exception handling in 
refreshLease() should be updated to recognize timeout exceptions (similar to 
BlobStorageException with OPERATION_TIMED_OUT) and continue the retry loop 
instead of invoking the shutdown hook.

{noformat}
11.12.2025 10:37:33.576 *ERROR* [AzureRepositoryLock-Refresher] 
org.apache.jackrabbit.oak.segment.azure.AzureRepositoryLock Can't renew the 
lease
java.lang.IllegalStateException: Timeout on blocking read for 5000000000 
NANOSECONDS
        at 
reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:124)
 [org.apache.jackrabbit.oak-segment-azure:1.88.0.T20251029163355-5d5086d]
        at reactor.core.publisher.Mono.block(Mono.java:1766) 
[org.apache.jackrabbit.oak-segment-azure:1.88.0.T20251029163355-5d5086d]
        at 
com.azure.storage.common.implementation.StorageImplUtils.blockWithOptionalTimeout(StorageImplUtils.java:149)
 [org.apache.jackrabbit.oak-segment-azure:1.88.0.T20251029163355-5d5086d]
        at 
com.azure.storage.blob.specialized.BlobLeaseClient.renewLeaseWithResponse(BlobLeaseClient.java:244)
 [org.apache.jackrabbit.oak-segment-azure:1.88.0.T20251029163355-5d5086d]
        at 
com.azure.storage.blob.specialized.BlobLeaseClient.renewLeaseWithResponse(BlobLeaseClient.java:212)
 [org.apache.jackrabbit.oak-segment-azure:1.88.0.T20251029163355-5d5086d]
        at 
org.apache.jackrabbit.oak.segment.azure.AzureRepositoryLock.refreshLease(AzureRepositoryLock.java:137)
 [org.apache.jackrabbit.oak-segment-azure:1.88.0.T20251029163355-5d5086d]
        at java.base/java.lang.Thread.run(Thread.java:1583)
{noformat}

https://github.com/apache/jackrabbit-oak/blob/4cdee6e21938e1d82a67416462bee9c3d4b6dc17/oak-segment-azure/src/main/java/org/apache/jackrabbit/oak/segment/azure/AzureRepositoryLock.java#L164-L167

> java.lang.IllegalStateException during lease renew is blocking writes 
> ----------------------------------------------------------------------
>
>                 Key: OAK-12039
>                 URL: https://issues.apache.org/jira/browse/OAK-12039
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: segment-azure
>    Affects Versions: 1.88.0
>            Reporter: Miroslav Smiljanic
>            Priority: Major
>
> When the Azure lease renewal times out on the client side (reactor 
> IllegalStateException wrapping TimeoutException), the current exception 
> handling treats it as a fatal error and triggers shutdown, even though this 
> is a transient condition that should be retried. The exception handling in 
> refreshLease() should be updated to recognize timeout exceptions (similar to 
> BlobStorageException with OPERATION_TIMED_OUT) and continue the retry loop 
> instead of invoking the shutdown hook.
> {noformat}
> 11.12.2025 10:37:33.576 *ERROR* [AzureRepositoryLock-Refresher] 
> org.apache.jackrabbit.oak.segment.azure.AzureRepositoryLock Can't renew the 
> lease
> java.lang.IllegalStateException: Timeout on blocking read for 5000000000 
> NANOSECONDS
>       at 
> reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:124)
>  [org.apache.jackrabbit.oak-segment-azure:1.88.0.T20251029163355-5d5086d]
>       at reactor.core.publisher.Mono.block(Mono.java:1766) 
> [org.apache.jackrabbit.oak-segment-azure:1.88.0.T20251029163355-5d5086d]
>       at 
> com.azure.storage.common.implementation.StorageImplUtils.blockWithOptionalTimeout(StorageImplUtils.java:149)
>  [org.apache.jackrabbit.oak-segment-azure:1.88.0.T20251029163355-5d5086d]
>       at 
> com.azure.storage.blob.specialized.BlobLeaseClient.renewLeaseWithResponse(BlobLeaseClient.java:244)
>  [org.apache.jackrabbit.oak-segment-azure:1.88.0.T20251029163355-5d5086d]
>       at 
> com.azure.storage.blob.specialized.BlobLeaseClient.renewLeaseWithResponse(BlobLeaseClient.java:212)
>  [org.apache.jackrabbit.oak-segment-azure:1.88.0.T20251029163355-5d5086d]
>       at 
> org.apache.jackrabbit.oak.segment.azure.AzureRepositoryLock.refreshLease(AzureRepositoryLock.java:137)
>  [org.apache.jackrabbit.oak-segment-azure:1.88.0.T20251029163355-5d5086d]
>       at java.base/java.lang.Thread.run(Thread.java:1583)
> {noformat}
> https://github.com/apache/jackrabbit-oak/blob/4cdee6e21938e1d82a67416462bee9c3d4b6dc17/oak-segment-azure/src/main/java/org/apache/jackrabbit/oak/segment/azure/AzureRepositoryLock.java#L164-L167



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to