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

HBCK2 fix addFsRegionsMissingInMeta to add regions in CLOSED state again

    XMLWordPrintableJSON

    Details

      Description

      Originally, addFsRegionsMissingInMeta relied on MetaTableAccessor to add new regions, which correctly added new regions in CLOSED state. HBASE-23791 removed dependency on MetaTableAccessor as to avoid relying on HBase IA private methods. MetaTableAccessor functions needed by HBCK2 were then re-implemented on HBCKMetaTableAccessor. Implementation for addRegionToMeta, though, was not fully ported, and it was not setting newly added regions state. 

      This would cause attempts to assign the newly added regions to fail, as AM ignore regions without state defined in meta, requiring extra calls for hbck2 setRegionState command for each of the newly added regions.

      Kudos for Toshihiro Suzuki who identified this problem while troubleshooting/fixing regions assignments issues with hbck2.

      This PR fix implementation of HBCKMetaTableAccessor.addRegionToMeta to insert new regions with CLOSED state, and also adds extra checks for this behaviour on both TestHBCKMetaTableAccessor and TestFsRegionsMetaRecoverer UTs.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                wchevreuil Wellington Chevreuil
                Reporter:
                wchevreuil Wellington Chevreuil
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: