[
https://issues.apache.org/jira/browse/HBASE-11503?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Andrew Kyle Purtell resolved HBASE-11503.
-----------------------------------------
Assignee: (was: Anoop Sam John)
Resolution: Cannot Reproduce
> Inconsistency in CP between HRegion#batchMutate() and MultiRowMutation()
> ------------------------------------------------------------------------
>
> Key: HBASE-11503
> URL: https://issues.apache.org/jira/browse/HBASE-11503
> Project: HBase
> Issue Type: Bug
> Components: Coprocessors, regionserver
> Reporter: Anoop Sam John
> Priority: Major
>
> From users perspective both are almost same except in MultiRowMutation all
> Mutations are applied in one transaction. So the call and behavior of CPs
> during both of these execution should be consistent. Now after HBASE-11423,
> all hooks are getting called.
> But in case of HRegion#batchMutate() when a prePut/Delete() call for one
> Mutation do a bypass, the actual Mutation we are not applying but will
> continue with other Mutations. But in case of MultiRowMutation, when
> prePut/Delete() call for one Mutation do a bypass, we just stop calling pre
> hooks for remaining Mutations but will end up applying those Mutations to
> Region.
> {code}
> public void preProcess(HRegion region, WALEdit walEdit) throws IOException {
> RegionCoprocessorHost coprocessorHost = region.getCoprocessorHost();
> if (coprocessorHost != null) {
> for (Mutation m : mutations) {
> if (m instanceof Put) {
> if (coprocessorHost.prePut((Put) m, walEdit, m.getDurability())) {
> // by pass everything
> return;
> }
> } else if (m instanceof Delete) {
> Delete d = (Delete) m;
> region.prepareDelete(d);
> if (coprocessorHost.preDelete(d, walEdit, d.getDurability())) {
> // by pass everything
> return;
> }
> }
> }
> }
> }
> {code}
--
This message was sent by Atlassian Jira
(v8.20.7#820007)