Bug: Failed multi-merge because two regions not adjacent (legitimately).
Status: Resolved | Priority: Major | Resolution: Fixed
Created: 23/Apr/20 21:05

Below is a multi-merge created by FixMeta provoked by 'hbck2 fixMeta'. The merge is legitimate in that indeed all Regions overlap. The merge is cutoff off at the current max of 10 Regions-at-a-time (which is another issue). The merge fails though because two Regions in the Set of Regions to merge are not adjacent when we do our pre-flight check. We could 'force' the merge but better if the 'check' is improved.

{code}
2020-04-22 22:04:57,048 WARN org.apache.hadoop.hbase.master.assignment.MergeTableRegionsProcedure: Unable to merge non-adjacent or non-overlapping regions 50b9f911320f64d0ab54a7606a6cdb77, 15877a8df3987176b12a2e2c4712c95f when force=false
2020-04-22 22:04:57,048 WARN org.apache.hadoop.hbase.master.MetaFixer: Failed overlap fix of [{ENCODED => 6f880442573f4ca0c2536ce2352e4883, NAME => 'X,,1567882650838.6f880442573f4ca0c2536ce2352e4883.', STARTKEY => '', ENDKEY => '\x01\x02\x05\x01\x03\x02\x01\x01\x01\x01\x02201908310200\x00\x00\x048.1-11B117\x00\x00\x00\x00\x00\x00iPad4,1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'}, {ENCODED => 98af7f02916e014c07ac099724c7ffaf, NAME => 'X,\x01\x01\x05\x01\x01,1558718898305.98af7f02916e014c07ac099724c7ffaf.', STARTKEY => '\x01\x01\x05\x01\x01', ENDKEY => '\x01\x01\x05\x01\x02'}, {ENCODED => d1a0b8772432c1148cdf7a8fad8e770c, NAME => 'X,\x01\x01\x05\x01\x02,1558718898305.d1a0b8772432c1148cdf7a8fad8e770c.', STARTKEY => '\x01\x01\x05\x01\x02', ENDKEY => '\x01\x01\x05\x01\x03'}, {ENCODED => 99738e58d057dafb861116a3efcb0285, NAME => 'X,\x01\x01\x05\x01\x03,1558718898305.99738e58d057dafb861116a3efcb0285.', STARTKEY => '\x01\x01\x05\x01\x03', ENDKEY => '\x01\x01\x05\x02\x01'}, {ENCODED => 50b9f911320f64d0ab54a7606a6cdb77, NAME => 'X,\x01\x01\x05\x02\x01,1558718898305.50b9f911320f64d0ab54a7606a6cdb77.', STARTKEY => '\x01\x01\x05\x02\x01', ENDKEY => '\x01\x01\x05\x02\x02'}, {ENCODED => 15877a8df3987176b12a2e2c4712c95f, NAME => 'X,\x01\x01\x05\x02\x03,1558718898305.15877a8df3987176b12a2e2c4712c95f.', STARTKEY => '\x01\x01\x05\x02\x03', ENDKEY => '\x01\x01\x06\x01\x01'}, {ENCODED => d5f0929fffbaec29ca99d4d0cd90c491, NAME => 'X,\x01\x01\x06\x01\x01,1558718898305.d5f0929fffbaec29ca99d4d0cd90c491.', STARTKEY => '\x01\x01\x06\x01\x01', ENDKEY => '\x01\x01\x06\x01\x02'}, {ENCODED => 8d72ed0d1d635511a323abef7026ec4f, NAME => 'X,\x01\x01\x06\x01\x03,1558718898305.8d72ed0d1d635511a323abef7026ec4f.', STARTKEY => '\x01\x01\x06\x01\x03', ENDKEY => '\x01\x01\x06\x02\x01'}, {ENCODED => 977f5a0e2f77a91531000d358f9a8eba, NAME => 'X,\x01\x01\x06\x02\x01,1558718898305.977f5a0e2f77a91531000d358f9a8eba.', STARTKEY => '\x01\x01\x06\x02\x01', ENDKEY => '\x01\x01\x06\x02\x02'}, {ENCODED => 21cdc09d13ae1ecefc6531786229f2ec, NAME => 'X,\x01\x01\x06\x02\x03,1558718898305.21cdc09d13ae1ecefc6531786229f2ec.', STARTKEY => '\x01\x01\x06\x02\x03', ENDKEY => '\x01\x01\x07\x01\x01'}]
org.apache.hadoop.hbase.exceptions.MergeRegionException: Unable to merge non-adjacent or non-overlapping regions 50b9f911320f64d0ab54a7606a6cdb77, 15877a8df3987176b12a2e2c4712c95f when force=false
        at org.apache.hadoop.hbase.master.assignment.MergeTableRegionsProcedure.checkRegionsToMerge(MergeTableRegionsProcedure.java:140)
        at org.apache.hadoop.hbase.master.assignment.MergeTableRegionsProcedure.<init>(MergeTableRegionsProcedure.java:105)
        at org.apache.hadoop.hbase.master.HMaster$2.run(HMaster.java:1961)
        at org.apache.hadoop.hbase.master.procedure.MasterProcedureUtil.submitProcedure(MasterProcedureUtil.java:134)
        at org.apache.hadoop.hbase.master.HMaster.mergeRegions(HMaster.java:1955)
        at org.apache.hadoop.hbase.master.MetaFixer.fixOverlaps(MetaFixer.java:221)
        at org.apache.hadoop.hbase.master.MetaFixer.fix(MetaFixer.java:77)
        at org.apache.hadoop.hbase.master.MasterRpcServices.fixMeta(MasterRpcServices.java:2649)
        at org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos$HbckService$2.callBlockingMethod(MasterProtos.java)
        at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:388)
        at org.apache.hadoop.hbase.ipc.CallRunner.run(CallRunner.java:133)
        at org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:338)
        at org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:318)

{code}