[
https://issues.apache.org/jira/browse/HBASE-19435?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16280063#comment-16280063
]
Anoop Sam John commented on HBASE-19435:
----------------------------------------
The immediate call to refresh file channel is ok. If that is also throwing an
issue, the call to getBlock or cacheBlock will fail right? If that attempt was
success, we will be still inside the while(true) loop and try read from that
same file again. But this is not going to be an infinite loop any way. Just
once more try and then give up. I think that is ok
bq.After 60s, the RS will disable the cache.
Where is this code of disable cache after 60 sec? So within this 60 secs
period if all attempts to refresh channel were failed( called with diff
getBlocks says) then again this disabling would happen?
On the patch, u can keep below code out of try block
{code}
if (accessFileNum >= fileChannels.length) {
237 throw new IOException("Required data len " +
StringUtils.byteDesc(buffer.remaining())
238 + " exceed the engine's capacity " +
StringUtils.byteDesc(capacity) + " where offset="
239 + globalOffset);
240 }
{code}
Or even keep only int accessLen = accessor.access(fileChannel, buffer,
accessOffset); within the try.
> Reopen Files for ClosedChannelException in BucketCache
> ------------------------------------------------------
>
> Key: HBASE-19435
> URL: https://issues.apache.org/jira/browse/HBASE-19435
> Project: HBase
> Issue Type: Bug
> Components: BucketCache
> Affects Versions: 2.0.0, 1.3.1
> Reporter: Zach York
> Assignee: Zach York
> Attachments: HBASE-19435.master.001.patch
>
>
> When using the FileIOEngine for BucketCache, the cache will be disabled if
> the connection is interrupted or closed. HBase will then get
> ClosedChannelExceptions trying to access the file. After 60s, the RS will
> disable the cache. This causes severe read performance degradation for
> workloads that rely on this cache. FileIOEngine never tries to reopen the
> connection. This JIRA is to reopen files when the BucketCache encounters a
> ClosedChannelException.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)