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

Miroslav Smiljanic updated OAK-9303:
------------------------------------
    Description: 
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]

 

  was:Implementation of SegmentArchiveReader#readSegment can throw 


> 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_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)

Reply via email to