[
https://issues.apache.org/jira/browse/OAK-9303?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Miroslav Smiljanic resolved OAK-9303.
-------------------------------------
Fix Version/s: 1.38.0
Resolution: Fixed
> 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
> Fix For: 1.38.0
>
> Attachments: OAK-9303_fix.patch, OAK-9303_fix_2.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)