You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Miroslav Smiljanic (Jira)" <ji...@apache.org> on 2020/12/17 10:18:00 UTC

[jira] [Comment Edited] (OAK-9303) AbstractPersistentCache#readSegment should propagate exception RepositoryNotReachableException

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

Miroslav Smiljanic edited comment on OAK-9303 at 12/17/20, 10:17 AM:
---------------------------------------------------------------------

The fix and modified test in the attached patch:

[^OAK-9303_fix.patch]


was (Author: miroslav):
The fix and modified patch in the attached patch:

[^OAK-9303_fix.patch]

> AbstractPersistentCache#readSegment should propagate exception RepositoryNotReachableException
> ----------------------------------------------------------------------------------------------
>
>                 Key: OAK-9303
>                 URL: https://issues.apache.org/jira/browse/OAK-9303
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: segment-tar
>    Affects Versions: 1.36.0
>            Reporter: Miroslav Smiljanic
>            Assignee: Miroslav Smiljanic
>            Priority: Major
>         Attachments: OAK-9303_fix.patch, OAK-9303_test.patch
>
>
> Implementation of SegmentArchiveReader#readSegment can throw [RepositoryNotReachableException|https://github.com/apache/jackrabbit-oak/blob/jackrabbit-oak-1.36/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/spi/RepositoryNotReachableException.java], when invoked in [AbstractPersistentCache. readSegment|https://github.com/apache/jackrabbit-oak/blob/da356a900ede7575401fa785408f6a13abc14d68/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/spi/persistence/persistentcache/AbstractPersistentCache.java#L79]. One possible reason for that exception to be thrown, is timeout when communicating with remote storage, or other type of error coming from the remote storage (check [AzureUtilities. readBufferFully|https://github.com/apache/jackrabbit-oak/blob/jackrabbit-oak-1.36/oak-segment-azure/src/main/java/org/apache/jackrabbit/oak/segment/azure/AzureUtilities.java#L78]).  
> After catching the exception, method returns *null*, which causes that later SNFE is being thrown in [FileStore.readSegment|https://github.com/apache/jackrabbit-oak/blob/jackrabbit-oak-1.36/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/file/FileStore.java#L516] (also counter about number of SNFE incremented), where instead RepositoryNotReachableException should be thrown at that point.  
> Test case which demonstrates described behaviour:
> [^OAK-9303_test.patch]
>  



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