HBASE-17504 The passed durability of Increment is ignored when syncing WAL (ChiaPing Tsai)

This commit is contained in:
tedyu 2017-01-22 08:44:11 -08:00
parent 57409371a0
commit 6e0f3f5bbc
1 changed files with 2 additions and 3 deletions

View File

@ -7984,7 +7984,7 @@ public class HRegion implements HeapSize, PropagatingConfigurationObserver, Regi
} }
// sync the transaction log outside the rowlock // sync the transaction log outside the rowlock
if(txid != 0) { if(txid != 0) {
syncOrDefer(txid, durability); syncOrDefer(txid, effectiveDurability);
} }
doRollBackMemstore = false; doRollBackMemstore = false;
} finally { } finally {
@ -8060,13 +8060,12 @@ public class HRegion implements HeapSize, PropagatingConfigurationObserver, Regi
} }
// Append new incremented KeyValue to list // Append new incremented KeyValue to list
byte [] qualifier = CellUtil.cloneQualifier(inc);
byte [] incrementAmountInBytes = Bytes.toBytes(incrementAmount); byte [] incrementAmountInBytes = Bytes.toBytes(incrementAmount);
tags = carryForwardTTLTag(tags, increment); tags = carryForwardTTLTag(tags, increment);
Cell newValue = new KeyValue(row, 0, row.length, Cell newValue = new KeyValue(row, 0, row.length,
columnFamilyName, 0, columnFamilyName.length, columnFamilyName, 0, columnFamilyName.length,
qualifier, 0, qualifier.length, inc.getQualifierArray(), inc.getQualifierOffset(), inc.getQualifierLength(),
ts, KeyValue.Type.Put, ts, KeyValue.Type.Put,
incrementAmountInBytes, 0, incrementAmountInBytes.length, incrementAmountInBytes, 0, incrementAmountInBytes.length,
tags); tags);