HBASE-10442 prepareDelete() isn't called before doPreMutationHook for a row deletion case (Jeffrey Zhong)

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1562673 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Andrew Kyle Purtell 2014-01-30 03:07:00 +00:00
parent ca175589f5
commit 1bc0a5b6c7
1 changed files with 6 additions and 1 deletions

View File

@ -2164,7 +2164,12 @@ public class HRegion implements HeapSize { // , Writable{
batchOp.retCodeDetails[i] = OperationStatus.SUCCESS; batchOp.retCodeDetails[i] = OperationStatus.SUCCESS;
} }
} else if (m instanceof Delete) { } else if (m instanceof Delete) {
if (coprocessorHost.preDelete((Delete) m, walEdit, m.getDurability())) { Delete curDel = (Delete) m;
if (curDel.getFamilyCellMap().isEmpty()) {
// handle deleting a row case
prepareDelete(curDel);
}
if (coprocessorHost.preDelete(curDel, walEdit, m.getDurability())) {
// pre hook says skip this Delete // pre hook says skip this Delete
// mark as success and skip in doMiniBatchMutation // mark as success and skip in doMiniBatchMutation
batchOp.retCodeDetails[i] = OperationStatus.SUCCESS; batchOp.retCodeDetails[i] = OperationStatus.SUCCESS;