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

Viraj Jasani resolved HBASE-28357.
----------------------------------
    Fix Version/s: 2.6.0
                   2.4.18
                   2.5.8
                   3.0.0-beta-2
     Hadoop Flags: Reviewed
       Resolution: Fixed

> MoveWithAck#isSuccessfulScan for Region movement should use Region End Key 
> for limiting scan to one region only.
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: HBASE-28357
>                 URL: https://issues.apache.org/jira/browse/HBASE-28357
>             Project: HBase
>          Issue Type: Improvement
>          Components: Region Assignment
>            Reporter: Mihir Monani
>            Assignee: Mihir Monani
>            Priority: Minor
>              Labels: pull-request-available
>             Fix For: 2.6.0, 2.4.18, 2.5.8, 3.0.0-beta-2
>
>
> Based on recent learnings and improvements in HBase Canary in HBASE-28204 and 
> HBASE-28356, I noticed that MoveWithAck.java class also uses similar code to 
> check that Region is online after region move.
>  
> {code:java}
>   private void isSuccessfulScan(RegionInfo region) throws IOException {
>     Scan scan = new 
> Scan().withStartRow(region.getStartKey()).setRaw(true).setOneRowLimit()
>       .setMaxResultSize(1L).setCaching(1).setFilter(new 
> FirstKeyOnlyFilter()).setCacheBlocks(false); {code}
> If the region, that was moved, is empty then MoveWithAck#isSuccessfulScan() 
> will end up scanning next region key space, which is not the intent. If 
> multiple regions in sequence are empty, then this could create too many 
> unnecessary scans.  By setting withStopRow(endKeyOfRegion, false) for the 
> scan object, this scan can be bound to only single region.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to