LuciferYang commented on code in PR #13528:
URL: https://github.com/apache/gravitino/pull/13528#discussion_r4122762687
##########
core/src/main/java/org/apache/gravitino/stats/storage/LancePartitionStatisticStorage.java:
##########
@@ -352,33 +305,18 @@ private void dropStatisticsImpl(Long tableId,
List<PartitionStatisticsDrop> drop
dataset.delete(filterSQL);
}
} finally {
- if (!datasetCache.isPresent() && dataset != null) {
+ if (dataset != null) {
dataset.close();
}
}
}
@Override
public void close() throws IOException {
- if (datasetCache.isPresent()) {
- Cache<Long, DatasetHolder> cache = datasetCache.get();
-
cache.asMap().values().forEach(LancePartitionStatisticStorage::closeDatasetHolder);
- cache.invalidateAll();
- cache.cleanUp();
- }
-
+ session.close();
Review Comment:
Done, added the null check for symmetry with the allocator close below.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]