diff --git hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java index 730a7f3..6c7bb7f 100644 --- hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java +++ hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java @@ -3280,11 +3280,12 @@ public class HRegion implements HeapSize, PropagatingConfigurationObserver, Regi if (fromCP != null) { cellCount += fromCP.size(); } - for (List cells : familyMaps[i].values()) { - cellCount += cells.size(); + if (getEffectiveDurability(mutation.getDurability()) != Durability.SKIP_WAL) { + for (List cells : familyMaps[i].values()) { + cellCount += cells.size(); + } } } - walEdit = new WALEdit(cellCount, isInReplay); lock(this.updatesLock.readLock(), numReadyToWrite); locked = true; @@ -3318,6 +3319,9 @@ public class HRegion implements HeapSize, PropagatingConfigurationObserver, Regi // Returned mutations from coprocessor correspond to the Mutation at index i. We can // directly add the cells from those mutations to the familyMaps of this mutation. mergeFamilyMaps(familyMaps[i], cpFamilyMap); // will get added to the memstore later + for (List cells : cpFamilyMap.values()) { + cellCount += cells.size(); + } } } } @@ -3326,6 +3330,7 @@ public class HRegion implements HeapSize, PropagatingConfigurationObserver, Regi // ------------------------------------ // STEP 3. Build WAL edit // ---------------------------------- + walEdit = new WALEdit(cellCount, isInReplay); Durability durability = Durability.USE_DEFAULT; for (int i = firstIndex; i < lastIndexExclusive; i++) { // Skip puts that were determined to be invalid during preprocessing