From 6e0f3f5bbc3183c8e768a72dbacde56be51442a1 Mon Sep 17 00:00:00 2001 From: tedyu Date: Sun, 22 Jan 2017 08:44:11 -0800 Subject: [PATCH] HBASE-17504 The passed durability of Increment is ignored when syncing WAL (ChiaPing Tsai) --- .../java/org/apache/hadoop/hbase/regionserver/HRegion.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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 18865f37c46..209f6adaf2b 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 @@ -7984,7 +7984,7 @@ public class HRegion implements HeapSize, PropagatingConfigurationObserver, Regi } // sync the transaction log outside the rowlock if(txid != 0) { - syncOrDefer(txid, durability); + syncOrDefer(txid, effectiveDurability); } doRollBackMemstore = false; } finally { @@ -8060,13 +8060,12 @@ public class HRegion implements HeapSize, PropagatingConfigurationObserver, Regi } // Append new incremented KeyValue to list - byte [] qualifier = CellUtil.cloneQualifier(inc); byte [] incrementAmountInBytes = Bytes.toBytes(incrementAmount); tags = carryForwardTTLTag(tags, increment); Cell newValue = new KeyValue(row, 0, row.length, columnFamilyName, 0, columnFamilyName.length, - qualifier, 0, qualifier.length, + inc.getQualifierArray(), inc.getQualifierOffset(), inc.getQualifierLength(), ts, KeyValue.Type.Put, incrementAmountInBytes, 0, incrementAmountInBytes.length, tags);