HBASE-21088 HStoreFile should be closed in HStore#hasReferences

This commit is contained in:
tedyu 2018-08-27 09:36:44 -07:00
parent 993e74b747
commit 9e2732edbb
1 changed files with 11 additions and 0 deletions

View File

@ -1712,6 +1712,17 @@ public class HStore implements Store, HeapSize, StoreConfigInformation, Propagat
LOG.error("Error trying to determine if store has references, assuming references exists",
ioe);
return true;
} finally {
if (reloadedStoreFiles != null) {
for (HStoreFile storeFile : reloadedStoreFiles) {
try {
storeFile.closeStoreFile(false);
} catch (IOException ioe) {
LOG.warn("Encountered exception closing " + storeFile + ": " + ioe.getMessage());
// continue with closing the remaining store files
}
}
}
}
}