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 8d86e11..bc11e48 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 @@ -7641,6 +7641,7 @@ public class HRegion implements HeapSize, PropagatingConfigurationObserver, Regi boolean writeBack = (incrementAmount != 0); // Carry forward any tags that might have been added by a coprocessor. List tags = Tag.carryForwardTags(inc); + boolean firstWrite = false; Cell currentValue = null; long ts = now; @@ -7652,6 +7653,8 @@ public class HRegion implements HeapSize, PropagatingConfigurationObserver, Regi tags = Tag.carryForwardTags(tags, currentValue); if (i < (sortedIncrements.size() - 1) && !CellUtil.matchingQualifier(inc, sortedIncrements.get(i + 1))) idx++; + } else { + firstWrite = true; } // Append new incremented KeyValue to list @@ -7678,7 +7681,7 @@ public class HRegion implements HeapSize, PropagatingConfigurationObserver, Regi RegionObserver.MutationType.INCREMENT, increment, currentValue, newValue); } allKVs.add(newValue); - if (writeBack) { + if (writeBack || firstWrite) { results.add(newValue); } }