HBASE-11882 Row level consistency may not be maintained with bulk load and
compaction (Jerry He) Signed-off-by: Ramkrishna <ramkrishna.s.vasudevan@intel.com>
This commit is contained in:
parent
7a699b9041
commit
8de30d32d4
|
@ -136,9 +136,17 @@ public abstract class Compactor {
|
|||
fd.maxKeyCount += keyCount;
|
||||
// calculate the latest MVCC readpoint in any of the involved store files
|
||||
Map<byte[], byte[]> fileInfo = r.loadFileInfo();
|
||||
byte tmp[] = fileInfo.get(HFileWriterV2.MAX_MEMSTORE_TS_KEY);
|
||||
if (tmp != null) {
|
||||
fd.maxMVCCReadpoint = Math.max(fd.maxMVCCReadpoint, Bytes.toLong(tmp));
|
||||
byte tmp[] = null;
|
||||
// Get and set the real MVCCReadpoint for bulk loaded files, which is the
|
||||
// SeqId number.
|
||||
if (r.isBulkLoaded()) {
|
||||
fd.maxMVCCReadpoint = Math.max(fd.maxMVCCReadpoint, r.getSequenceID());
|
||||
}
|
||||
else {
|
||||
tmp = fileInfo.get(HFileWriterV2.MAX_MEMSTORE_TS_KEY);
|
||||
if (tmp != null) {
|
||||
fd.maxMVCCReadpoint = Math.max(fd.maxMVCCReadpoint, Bytes.toLong(tmp));
|
||||
}
|
||||
}
|
||||
tmp = fileInfo.get(FileInfo.MAX_TAGS_LEN);
|
||||
if (tmp != null) {
|
||||
|
|
|
@ -115,6 +115,7 @@ public class TestHRegionServerBulkLoad {
|
|||
KeyValue kv = new KeyValue(rowkey(i), family, qualifier, now, value);
|
||||
writer.append(kv);
|
||||
}
|
||||
writer.appendFileInfo(StoreFile.BULKLOAD_TIME_KEY, Bytes.toBytes(now));
|
||||
} finally {
|
||||
writer.close();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue