HBASE-21088 HStoreFile should be closed in HStore#hasReferences

This commit is contained in:
Ted Yu 2018-08-27 20:31:08 -07:00 committed by Michael Stack
parent e826e3f2b8
commit c1cd6d5a89
No known key found for this signature in database
GPG Key ID: 9816C7FC8ACC93D2
1 changed files with 11 additions and 0 deletions

View File

@ -1670,6 +1670,17 @@ public class HStore implements Store, HeapSize, StoreConfigInformation, Propagat
LOG.error("Error trying to determine if store has references, assuming references exists", LOG.error("Error trying to determine if store has references, assuming references exists",
ioe); ioe);
return true; 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
}
}
}
} }
} }