Skip to content

Commit ee19008

Browse files
BukrosSzabolcsbinlijin
authored andcommitted
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>
1 parent 00bb0f2 commit ee19008

File tree

1 file changed

+6
-7
lines changed
  • hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver

1 file changed

+6
-7
lines changed

hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2825,22 +2825,21 @@ protected FlushResultImpl internalFlushCacheAndCommit(WAL wal, MonitoredTask sta
28252825

28262826
// Switch snapshot (in memstore) -> new hfile (thus causing
28272827
// all the store scanners to reset/reseek).
2828-
Iterator<HStore> it = storesToFlush.iterator();
2829-
// stores.values() and storeFlushCtxs have same order
2830-
for (StoreFlushContext flush : storeFlushCtxs.values()) {
2831-
boolean needsCompaction = flush.commit(status);
2828+
for (Map.Entry<byte[], StoreFlushContext> flushEntry : storeFlushCtxs.entrySet()) {
2829+
StoreFlushContext sfc = flushEntry.getValue();
2830+
boolean needsCompaction = sfc.commit(status);
28322831
if (needsCompaction) {
28332832
compactionRequested = true;
28342833
}
2835-
byte[] storeName = it.next().getColumnFamilyDescriptor().getName();
2836-
List<Path> storeCommittedFiles = flush.getCommittedFiles();
2834+
byte[] storeName = flushEntry.getKey();
2835+
List<Path> storeCommittedFiles = sfc.getCommittedFiles();
28372836
committedFiles.put(storeName, storeCommittedFiles);
28382837
// Flush committed no files, indicating flush is empty or flush was canceled
28392838
if (storeCommittedFiles == null || storeCommittedFiles.isEmpty()) {
28402839
MemStoreSize storeFlushableSize = prepareResult.storeFlushableSize.get(storeName);
28412840
prepareResult.totalFlushableSize.decMemStoreSize(storeFlushableSize);
28422841
}
2843-
flushedOutputFileSize += flush.getOutputFileSize();
2842+
flushedOutputFileSize += sfc.getOutputFileSize();
28442843
}
28452844
storeFlushCtxs.clear();
28462845

0 commit comments

Comments
 (0)