You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "ramkrishna.s.vasudevan (JIRA)" <ji...@apache.org> on 2017/05/16 09:18:04 UTC

[jira] [Commented] (HBASE-18055) Release HFileBlocks before calling shipped when switching from pread to stream causes rpc return value corruption

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

ramkrishna.s.vasudevan commented on HBASE-18055:
------------------------------------------------

bq. newHeap = new KeyValueHeap(newCurrentScanners, store.getComparator());
The above looks good. This change was needed I believe. Good that you made it here. 
Rest LGTM. Thanks for the patch. 

> Release HFileBlocks before calling shipped when switching from pread to stream causes rpc return value corruption
> -----------------------------------------------------------------------------------------------------------------
>
>                 Key: HBASE-18055
>                 URL: https://issues.apache.org/jira/browse/HBASE-18055
>             Project: HBase
>          Issue Type: Bug
>          Components: regionserver, Scanners
>    Affects Versions: 2.0.0
>            Reporter: ramkrishna.s.vasudevan
>            Assignee: Duo Zhang
>             Fix For: 2.0.0
>
>         Attachments: HBASE-18055.patch
>
>
> In HBASE-17917 tries to switch from pread to stream read when a specific size of bytes are read. So in order to switch over, it closes the existing scanners and creates a new scanners with pread=false.
> When we close the exisitng scanners - if the blocks are served from offheap cache we will decrement the ref count on those blocks and if it becomes zero we make the block ready for eviction. Then there is a chance that the result could be corrupted if new blocks occupy the cache. So the expectation was that till the RPC call completes the response we will hold on to the blocks that are referred by the scan. (except the last one). So trying to switch over to stream read will break this expectation and hence TestBlockEvictionfromclient fails. 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)