Anoop Sam John created HBASE-11503: -------------------------------------- Summary: 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 Assignee: Anoop Sam John
>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 (v6.2#6252)