github-actions[bot] commented on code in PR #66913:
URL: https://github.com/apache/doris/pull/66913#discussion_r3878684661
##########
fe/fe-core/src/main/java/org/apache/doris/datasource/iceberg/IcebergExternalCatalog.java:
##########
@@ -173,17 +221,108 @@ protected List<String>
listTableNamesFromRemote(SessionContext ctx, String dbNam
}
@Override
- public void onClose() {
+ public synchronized void onClose() {
+ ThreadPoolExecutor retiredExecutor = threadPoolWithPreAuth;
+ threadPoolWithPreAuth = null;
super.onClose();
- if (null != catalog) {
- try {
- if (catalog instanceof AutoCloseable) {
- ((AutoCloseable) catalog).close();
- }
- catalog = null;
- } catch (Exception e) {
- LOG.warn("Failed to close iceberg catalog: {}", getName(), e);
+ Catalog retiredCatalog = catalog;
+ catalog = null;
+ resourceTracker.retireCurrent(() -> {
Review Comment:
[P1] Track catalog-level operations before retiring this generation
`beginLoad()` is only reached through `beginTableLoad()`, while
create/drop/rename table, namespace, and view operations use the captured
`IcebergMetadataOps.catalog` directly after `makeSureInitialized()`. A
concurrent ALTER/reset can therefore reach this zero-ref retirement and, with
the new Hive/Hadoop close wrappers, close G1's shared FileIO while the remote
DDL is still running (for example between `tableExist()` and `dropTable()`).
Give every direct catalog operation an exact-generation guard held through
remote I/O/commit, and add a reset-barrier test.
--
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]