HBASE-23589: FlushDescriptor contains non-matching family/output combinations (#949)
Signed-off-by: Duo Zhang <zhangduo@apache.org> Signed-off-by: Lijin Bin <binlijin@apache.org>
This commit is contained in:
parent
00bb0f20d4
commit
ee19008b12
|
@ -2825,22 +2825,21 @@ public class HRegion implements HeapSize, PropagatingConfigurationObserver, Regi
|
||||||
|
|
||||||
// Switch snapshot (in memstore) -> new hfile (thus causing
|
// Switch snapshot (in memstore) -> new hfile (thus causing
|
||||||
// all the store scanners to reset/reseek).
|
// all the store scanners to reset/reseek).
|
||||||
Iterator<HStore> it = storesToFlush.iterator();
|
for (Map.Entry<byte[], StoreFlushContext> flushEntry : storeFlushCtxs.entrySet()) {
|
||||||
// stores.values() and storeFlushCtxs have same order
|
StoreFlushContext sfc = flushEntry.getValue();
|
||||||
for (StoreFlushContext flush : storeFlushCtxs.values()) {
|
boolean needsCompaction = sfc.commit(status);
|
||||||
boolean needsCompaction = flush.commit(status);
|
|
||||||
if (needsCompaction) {
|
if (needsCompaction) {
|
||||||
compactionRequested = true;
|
compactionRequested = true;
|
||||||
}
|
}
|
||||||
byte[] storeName = it.next().getColumnFamilyDescriptor().getName();
|
byte[] storeName = flushEntry.getKey();
|
||||||
List<Path> storeCommittedFiles = flush.getCommittedFiles();
|
List<Path> storeCommittedFiles = sfc.getCommittedFiles();
|
||||||
committedFiles.put(storeName, storeCommittedFiles);
|
committedFiles.put(storeName, storeCommittedFiles);
|
||||||
// Flush committed no files, indicating flush is empty or flush was canceled
|
// Flush committed no files, indicating flush is empty or flush was canceled
|
||||||
if (storeCommittedFiles == null || storeCommittedFiles.isEmpty()) {
|
if (storeCommittedFiles == null || storeCommittedFiles.isEmpty()) {
|
||||||
MemStoreSize storeFlushableSize = prepareResult.storeFlushableSize.get(storeName);
|
MemStoreSize storeFlushableSize = prepareResult.storeFlushableSize.get(storeName);
|
||||||
prepareResult.totalFlushableSize.decMemStoreSize(storeFlushableSize);
|
prepareResult.totalFlushableSize.decMemStoreSize(storeFlushableSize);
|
||||||
}
|
}
|
||||||
flushedOutputFileSize += flush.getOutputFileSize();
|
flushedOutputFileSize += sfc.getOutputFileSize();
|
||||||
}
|
}
|
||||||
storeFlushCtxs.clear();
|
storeFlushCtxs.clear();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue