Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-28357

MoveWithAck#isSuccessfulScan for Region movement should use Region End Key for limiting scan to one region only.

VotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Reviewed

    Description

      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.

       

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

      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.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            mihir6692 Mihir Monani
            mihir6692 Mihir Monani
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment