924060929 commented on code in PR #68238:
URL: https://github.com/apache/doris/pull/68238#discussion_r4061315878
##########
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:
Fixed in f28f09522223e2f9f8e9f448f2771f8acfd4d401.
ExternalMetaCacheMgr.invalidateTableCache(ExternalTable) now calls
invalidateLanceTableAccess(catalogId) before routing to the typed engine
invalidation, restoring the Lance access-cache retirement that the rewritten
route had bypassed. Extended
LanceCatalogLifecycleTest.testMetadataRefreshInvalidatesAccessWithoutClosingSession
to cover the typed route (it now asserts invalidateTableAccessCache() a third
time for invalidateTableCache).
##########
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:
Fixed in f28f09522223e2f9f8e9f448f2771f8acfd4d401.
PaimonMetadataOps.afterDropDb now relies on the cached database's synchronous
removal listener, which already runs resetMetaToUninitialized(true) -> typed
invalidateDb(db), and no longer issues the explicit second typed invalidation.
Added testResolvedDropInvalidatesDatabaseSdkCacheExactlyOnce, which asserts
exactly one typed invalidateDb(ExternalDatabase) call on the resolved drop path.
--
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]