github-actions[bot] commented on code in PR #68196:
URL: https://github.com/apache/doris/pull/68196#discussion_r4071132192


##########
fe/fe-core/src/main/java/org/apache/doris/datasource/ExternalMetaCacheMgr.java:
##########
@@ -415,6 +420,7 @@ public void removeCatalog(long catalogId) {
                     cache, catalogId, "removeCatalog",
                     () -> cache.invalidateCatalog(catalogId)));
         } finally {
+            rowCountCache.invalidateCatalog(catalogId);

Review Comment:
   [P1] Publish this fence before the retired catalog name becomes reusable. 
Live DROP and rename remove the old name/id mappings and release CatalogMgr's 
write lock before cleanup (including onClose) reaches this scan or its 
permanent-removal counterpart, so a concurrent CREATE with the same name can 
run first. External table IDs are deterministic from catalog/DB/table names and 
RowCountKey equality uses only tableId, so that replacement can return the old 
resident future without creating a new full-scope LoadKey fence. If onClose 
throws, cleanup never reaches this scan at all. This is distinct from the 
earlier missing-retirement-barrier thread: the barrier exists now, but its 
post-unlock placement leaves the same-name replacement observable before it 
runs. Fence while the mapping lock still excludes same-name admission (and 
avoid a second O(N) scan), with a latching DROP/rename/recreate 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]

Reply via email to