Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Cannot Reproduce
-
None
-
None
-
None
Description
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.
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; } } } } }