github-actions[bot] commented on code in PR #68238:
URL: https://github.com/apache/doris/pull/68238#discussion_r4061245207
##########
fe/fe-core/src/main/java/org/apache/doris/datasource/ExternalMetaCacheMgr.java:
##########
@@ -681,9 +688,9 @@ public ExternalRowCountCache getRowCountCache() {
}
public void invalidateTableCache(ExternalTable dorisTable) {
- invalidateTable(dorisTable.getCatalog().getId(),
- dorisTable.getDbName(),
- dorisTable.getName());
+ long catalogId = dorisTable.getCatalog().getId();
+ routeCatalogEngines(catalogId, cache -> safeInvalidate(
Review Comment:
[P1] Preserve Lance's table-access invalidation in this typed route. Before
this rewrite, `invalidateTableCache` delegated to `invalidateTable(...)`, whose
first step clears the Lance catalog's cached dataset URI/access options. The
new direct routing skips that side effect: leader `REFRESH TABLE` reaches only
this method, while replay explicitly clears Lance access separately, so the
leader can keep opening the pre-refresh URI for the default 60-second TTL after
an external replacement. Call `invalidateLanceTableAccess(catalogId)` here (or
share an equivalent helper) and cover the leader refresh path with a warmed
Lance access entry.
##########
fe/fe-core/src/main/java/org/apache/doris/datasource/paimon/PaimonMetadataOps.java:
##########
@@ -193,7 +193,13 @@ private void performDropDb(String dbName, boolean
ifExists, boolean force) throw
@Override
public void afterDropDb(String dbName) {
+ Optional<ExternalDatabase<? extends ExternalTable>> db =
dorisCatalog.getDbForReplay(dbName);
dorisCatalog.unregisterDatabase(dbName);
+ if (db.isPresent()) {
Review Comment:
[P2] Avoid running the resolved-database SDK invalidation twice. When this
name hits the cached database, `unregisterDatabase` synchronously fires its
removal listener; `resetMetaToUninitialized(true)` already reaches the new
typed `invalidateDb(db)` route and scans Paimon's SDK keys under the catalog
write fence. This added call then takes the fence and scans the unrelated
remainder again on every normal DROP DATABASE and resolved replay. Unregister
the resolved local key and rely on that single callback, or suppress the
callback and keep exactly one explicit typed invalidation; add a call-count
regression for both leader and replay.
--
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]