924060929 commented on code in PR #70157:
URL: https://github.com/apache/doris/pull/70157#discussion_r4464445080


##########
fe/fe-core/src/main/java/org/apache/doris/datasource/ExternalDatabase.java:
##########
@@ -691,14 +691,16 @@ public void invalidateTableLookupDependencies() {
     }
 
     public Optional<Runnable> beginTableMetadataRefresh() {
-        return metaCache == null ? Optional.empty() : 
Optional.of(metaCache.beginMetadataRefresh());
+        extCatalog.beginTableLookupRefresh();
+        return Optional.of(extCatalog::endTableLookupRefresh);
     }
 
     /** A missing result is authorized only against the retained DB, names and 
object generations. */
     @SuppressWarnings("unchecked")
     public Optional<Runnable> observeTableLookup(ExternalTable table) {
+        OptionalLong refreshGeneration = 
extCatalog.observeTableLookupRefreshGeneration();

Review Comment:
   Fixed in 92514de46f4a. Uninitialized databases, absent object caches and 
retired catalog epochs are now rejected before acquiring the synchronized 
catalog refresh observation. Eligible reads still capture the refresh 
generation before remote IO, and all final identity/generation checks remain in 
place. Added three latch-controlled tests that keep the catalog monitor held by 
another thread: all three time out on the previous implementation and complete 
before monitor release after this change. The full affected 214-test suite, FE 
build and Checkstyle pass.



-- 
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]

Reply via email to