hello-stephen commented on code in PR #71398:
URL: https://github.com/apache/doris/pull/71398#discussion_r4794908450
##########
fe/fe-core/src/main/java/org/apache/doris/datasource/iceberg/IcebergExternalMetaCache.java:
##########
@@ -1286,14 +1291,25 @@ private ManifestCacheValue loadDeleteFiles(
return builder.build();
}
+ private void trackManifestFileIo(NameMapping nameMapping,
IcebergMetadataOps ops, Table table) {
+ try {
+ fileIoTracker.track(nameMapping.getCtlId(), ops, table.io());
+ } catch (Exception e) {
+ // Cache bookkeeping must not reject a custom metadata-only table
whose IO is unavailable.
+ LOG.warn("Failed to track iceberg FileIO for manifest cache
cleanup", e);
+ }
+ }
+
/**
- * Collect every FileIO a catalog's cached values still retain. A snapshot
value can outlive
+ * Collect tracked catalog IO as well as IO still retained by cached
values. A snapshot value can outlive
* its weighted/expired/collected table entry while retaining the same
frozen table graph, so
* both entries are enumerated; identity de-duplication keeps the later
drop pass bounded.
*/
private List<FileIO> collectManifestFileIos(long catalogId) {
IdentityHashMap<FileIO, Boolean> seen = new IdentityHashMap<>();
- List<FileIO> fileIos = new ArrayList<>();
+ // Writes can outlive every read-cache entry while the captured
catalog generation still owns IO.
+ List<FileIO> fileIos = fileIoTracker.snapshot(catalogId);
Review Comment:
[P3] Invalidate tracked manifest caches after the Doris cache group is
removed. The first `REFRESH CATALOG` removes that group, but a writer that
already holds a lease can refill the SDK cache without recreating it. A second
refresh then skips Iceberg in `ExternalMetaCacheMgr.safeInvalidate` because
`supportsInvalidationWithoutCatalogEntries()` defaults to false. The new test
calls the engine directly twice and bypasses this guard. Opt Iceberg into
invalidation without an entry group and exercise both refreshes through the
manager.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]