NihalJain commented on PR #6169:
URL: https://github.com/apache/hbase/pull/6169#issuecomment-2299606524
Verified the change in standalone mode. The code works as expected i.e. the
procedure is not even submitted and we fail fast with this patch and as a
result no procedure rollback happens.
Shell output with fix:
```
hbase:004:0> merge_region '299fda3a5e8630098a46363b0581fb9a',
'e0c5f133ae0f23ce56296b8c763fa00f'
ERROR: org.apache.hadoop.hbase.DoNotRetryIOException: Merge of
[299fda3a5e8630098a46363b0581fb9a, e0c5f133ae0f23ce56296b8c763fa00f] failed as
region merge is disabled for the table
at
org.apache.hadoop.hbase.master.HMaster.mergeRegions(HMaster.java:2269)
at
org.apache.hadoop.hbase.master.MasterRpcServices.mergeTableRegions(MasterRpcServices.java:942)
at
org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos$MasterService$2.callBlockingMethod(MasterProtos.java)
at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:444)
at org.apache.hadoop.hbase.ipc.CallRunner.run(CallRunner.java:124)
at org.apache.hadoop.hbase.ipc.RpcHandler.run(RpcHandler.java:102)
at org.apache.hadoop.hbase.ipc.RpcHandler.run(RpcHandler.java:82)
For usage try 'help "merge_region"'
Took 0.2516 seconds
hbase:006:0> split 'testcreatetablewithsplitdisableparameter','30'
ERROR: org.apache.hadoop.hbase.DoNotRetryIOException: Split region
testcreatetablewithsplitdisableparameter,,1724177100721.42bc211e7063bb1d8fa7619a50a98c3a.
failed as region split is disabled for the table
at
org.apache.hadoop.hbase.master.HMaster.splitRegion(HMaster.java:2303)
at
org.apache.hadoop.hbase.master.MasterRpcServices.splitRegion(MasterRpcServices.java:954)
at
org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos$MasterService$2.callBlockingMethod(MasterProtos.java)
at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:444)
at org.apache.hadoop.hbase.ipc.CallRunner.run(CallRunner.java:124)
at org.apache.hadoop.hbase.ipc.RpcHandler.run(RpcHandler.java:102)
at org.apache.hadoop.hbase.ipc.RpcHandler.run(RpcHandler.java:82)
For usage try 'help "split"'
Took 0.0204 seconds
```
Shell output without fix:
```
hbase:010:0> merge_region '62b765354fdb007d571b98b5e6b5542e.',
'212a918d92b35bf3afe270962bedb350'
ERROR: Merge of [{ENCODED => 62b765354fdb007d571b98b5e6b5542e, NAME =>
'testCreateTableWithMergeDisableParameter,,1724176086193.62b765354fdb007d571b98b5e6b5542e.',
STARTKEY => '', ENDKEY => 'a'}, {ENCODED => 212a918d92b35bf3afe270962bedb350,
NAME =>
'testCreateTableWithMergeDisableParameter,a,1724176086193.212a918d92b35bf3afe270962bedb350.',
STARTKEY => 'a', ENDKEY => ''}] failed as region merge is disabled for the
table
For usage try 'help "merge_region"'
Took 0.2405 seconds
hbase:007:0> split 'testcreatetablewithsplitdisableparameter','30'
ERROR: Split region
testcreatetablewithsplitdisableparameter,,1724176000059.66d8a2862968698d012927d9f9d4dbcc.
failed as region split is disabled for the table
For usage try 'help "split"'
Took 0.3706 seconds
```
Logs with fix:
```
2024-08-20T23:34:41,735 WARN
[RpcServer.default.FPBQ.Fifo.handler=29,queue=2,port=16000] master.HMaster:
Merge is disabled for the table! Skipping merge of
[299fda3a5e8630098a46363b0581fb9a, e0c5f133ae0f23ce56296b8c763fa00f]
2024-08-20T23:35:07,354 WARN
[RpcServer.default.FPBQ.Fifo.handler=29,queue=2,port=16000] master.HMaster:
Split is disabled for the table! Skipping split of {ENCODED =>
42bc211e7063bb1d8fa7619a50a98c3a, NAME =>
'testcreatetablewithsplitdisableparameter,,1724177100721.42bc211e7063bb1d8fa7619a50a98c3a.',
STARTKEY => '', ENDKEY => ''}
```
Logs without fix:
```
2024-08-20T23:18:53,744 WARN [PEWorker-2]
assignment.MergeTableRegionsProcedure: Merge is disabled for the table!
Skipping merge of [{ENCODED => 62b765354fdb007d571b98b5e6b5542e, NAME =>
'testCreateTableWithMergeDisableParameter,,1724176086193.62b765354fdb007d571b98b5e6b5542e.',
STARTKEY => '', ENDKEY => 'a'}, {ENCODED => 212a918d92b35bf3afe270962bedb350,
NAME =>
'testCreateTableWithMergeDisableParameter,a,1724176086193.212a918d92b35bf3afe270962bedb350.',
STARTKEY => 'a', ENDKEY => ''}]
2024-08-20T23:17:36,504 WARN [PEWorker-1]
assignment.SplitTableRegionProcedure: pid=13, split is disabled for the table!
Skipping split of {ENCODED => 66d8a2862968698d012927d9f9d4dbcc, NAME =>
'testcreatetablewithsplitdisableparameter,,1724176000059.66d8a2862968698d012927d9f9d4dbcc.',
STARTKEY => '', ENDKEY => ''}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]