HBASE-21088 HStoreFile should be closed in HStore#hasReferences

Conflicts:
	hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java
This commit is contained in:
tedyu 2018-08-27 09:38:03 -07:00 committed by Andrew Purtell
parent dbb634ad1b
commit d07cab18a6
1 changed files with 11 additions and 0 deletions

View File

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