Uh oh!
There was an error while loading. Please reload this page.
PHOENIX-6511 Deletes fail in case of failed region split - #1266
Conversation
abhishek-chouhan
commented
Jul 13, 2021
Note, this impacts 4.x only. 5.x has a different logic wrt. to handling this. In hbase2.x the split hooks got moved to master observer since master handles the split through procedures, hence only region close is blocked by the lock in UngroupedAggRegionObserver. In case of a region close, if an error is encountered RS is aborted which results in resetting the state and hence is not a problem. |
dbwong
commented
Jul 13, 2021
Quick question i guess the assumption is if we are post split we can't be splitting again? Does a hbase state machine explicitly prevent this or is the assumption that there is no way a flush or set of flushes could cause this to be splitting again? |
db60338 to
8fc6019Compareabhishek-chouhan
commented
Jul 13, 2021
@dbwong There was a small window between deleting the exclusive lock for region splitting and execution of the post hook. I've changed the PR so that we do our logic in the preRollbackSplit hook, which is executed just before deleting the lock. |
stoty
commented
Jul 13, 2021
💔 -1 overall
This message was automatically generated. |
8fc6019 to
3d2f969Comparestoty
commented
Jul 14, 2021
💔 -1 overall
This message was automatically generated. |
stoty
commented
Jul 14, 2021
💔 -1 overall
This message was automatically generated. |
virajjasani
left a comment
There was a problem hiding this comment.
Left a couple of nits, +1 overall
| ObserverContext ctx = new ObserverContext<>(null); | ||
| ctx.prepare(region.getCoprocessorHost().findCoprocessorEnvironment( | ||
| UngroupedAggregateRegionObserver.class.getName())); |
There was a problem hiding this comment.
nit: Since preSplit and preRollBackSplit requires ObserverContext<RegionCoprocessorEnvironment> specifically, we can define ObserverContext accordingly here:
ObserverContext<RegionCoprocessorEnvironment> ctx = new ObserverContext<>(null);
ctx.prepare((RegionCoprocessorEnvironment) region.getCoprocessorHost().findCoprocessorEnvironment(
UngroupedAggregateRegionObserver.class.getName()));
| setUpConfigForMiniCluster(conf); | ||
| hbaseTestUtil.startMiniCluster(); | ||
| // establish url and quorum. Need to use PhoenixDriver and not PhoenixTestDriver | ||
| zkQuorum = "localhost:" + hbaseTestUtil.getZkCluster().getClientPort(); |
There was a problem hiding this comment.
nit: could be a local variable than a class level field
3d2f969 to
b40ad14Compareabhishek-chouhan
commented
Jul 15, 2021
Thanks for the reviews @virajjasani@dbwong@kadirozde |
stoty
commented
Jul 15, 2021
💔 -1 overall
This message was automatically generated. |
| UngroupedAggregateRegionObserver obs = | ||
| (UngroupedAggregateRegionObserver) region.getCoprocessorHost() | ||
| .findCoprocessor(UngroupedAggregateRegionObserver.class.getName()); | ||
| ObserverContext<RegionCoprocessorEnvironment> ctx = new ObserverContext<>(null); |
There was a problem hiding this comment.
4.x still support jdk1.7 now, seems compile broken:
UngroupedAggregateRegionObserverSplitFailureIT.java:[91,69] cannot infer type arguments for org.apache.hadoop.hbase.coprocessor.ObserverContext<>
[ERROR] reason: cannot infer type-variable(s) E
[ERROR] (actual and formal argument lists differ in length)
There was a problem hiding this comment.
Thanks for pointing this out. Turns out that the constructor is different between 1.4 and later. Fixed the issue now y using compatObserverContext
No description provided.