File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed
oak-segment-azure/src/main/java/org/apache/jackrabbit/oak/segment/azure Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -153,9 +153,11 @@ private void refreshLease() {
153153
154154 if (e instanceof BlobStorageException ) {
155155 BlobStorageException storageException = (BlobStorageException ) e ;
156- if (Set .of (BlobErrorCode .OPERATION_TIMED_OUT ,
156+ BlobErrorCode errorCode = storageException .getErrorCode ();
157+ if (errorCode != null &&
158+ Set .of (BlobErrorCode .OPERATION_TIMED_OUT ,
157159 BlobErrorCode .SERVER_BUSY ,
158- BlobErrorCode .INTERNAL_ERROR ).contains (storageException . getErrorCode () )) {
160+ BlobErrorCode .INTERNAL_ERROR ).contains (errorCode )) {
159161 log .warn ("Could not renew the lease due to the operation timeout or service unavailability. Retry in progress ..." , e );
160162 } else {
161163 log .warn ("Could not renew lease due to storage exception. Retry in progress ... " , e );
Original file line number Diff line number Diff line change @@ -155,10 +155,12 @@ private void refreshLease() {
155155
156156 if (e instanceof StorageException ) {
157157 StorageException storageException = (StorageException ) e ;
158- if (Set .of (StorageErrorCodeStrings .OPERATION_TIMED_OUT
158+ String errorCode = storageException .getErrorCode ();
159+ if (errorCode != null &&
160+ Set .of (StorageErrorCodeStrings .OPERATION_TIMED_OUT
159161 , StorageErrorCode .SERVICE_INTERNAL_ERROR
160162 , StorageErrorCodeStrings .SERVER_BUSY
161- , StorageErrorCodeStrings .INTERNAL_ERROR ).contains (storageException . getErrorCode () )) {
163+ , StorageErrorCodeStrings .INTERNAL_ERROR ).contains (errorCode )) {
162164 log .warn ("Could not renew the lease due to the operation timeout or service unavailability. Retry in progress ..." , e );
163165 } else if (storageException .getHttpStatusCode () == Constants .HeaderConstants .HTTP_UNUSED_306 ) {
164166 log .warn ("Client side error. Retry in progress ..." , e );
You can’t perform that action at this time.
0 commit comments