From 0b6d9b25f59f2b5e858d008222084f31b2cee145 Mon Sep 17 00:00:00 2001 From: Nick Dimiduk Date: Thu, 13 Aug 2015 16:19:26 -0700 Subject: [PATCH] HBASE-10844 Coprocessor failure during batchmutation leaves the memstore datastructs in an inconsistent state Signed-off-by: Andrew Purtell --- .../org/apache/hadoop/hbase/regionserver/HRegion.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java index 2c236394148..709e890ceb3 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java @@ -1446,7 +1446,14 @@ public class HRegion implements HeapSize, PropagatingConfigurationObserver, Regi // close each store in parallel for (final Store store : stores.values()) { - assert abort || store.getFlushableSize() == 0 || writestate.readOnly; + long flushableSize = store.getFlushableSize(); + if (!(abort || flushableSize == 0 || writestate.readOnly)) { + getRegionServerServices().abort("Assertion failed while closing store " + + getRegionInfo().getRegionNameAsString() + " " + store + + ". flushableSize expected=0, actual= " + flushableSize + + ". Current memstoreSize=" + getMemstoreSize() + ". Maybe a coprocessor " + + "operation failed and left the memstore in a partially updated state.", null); + } completionService .submit(new Callable>>() { @Override