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


##########
fe/fe-core/src/main/java/org/apache/doris/datasource/metacache/MetaCache.java:
##########
@@ -662,6 +687,103 @@ public void invalidate(String localName, long id) {
         }
     }
 
+    /** Fences old objects while retaining unrelated numeric routes for fresh 
reload after wide retirement. */
+    public void invalidateLookup(String localName, boolean allObjects) {
+        metaObjLifecycleLock.writeLock().lock();
+        try {
+            synchronized (namesMutationLock) {
+                invalidateNames();
+                metaObjGeneration.incrementAndGet();
+                lookupObservationGeneration++;
+                if (allObjects) {
+                    metaObjCache.invalidateAll();
+                } else {
+                    metaObjCache.invalidate(localName);
+                }
+                // Only the target's routes retire. Surviving siblings must 
reload by ID without
+                // requiring a foreground named lookup to register their 
identities again.
+                String foldedName = allObjects ? 
localName.toLowerCase(Locale.ROOT) : localName;
+                idToName.entrySet().removeIf(entry -> allObjects

Review Comment:
   [P2] Keep live target IDs reloadable during explicit refresh
   
   `REFRESH TABLE` now reaches this removal without first proving remote 
absence. After `ANALYZE TABLE ctl.db.t; REFRESH TABLE ctl.db.t`, with `t` still 
present and no intervening named table read, `getMetaObjById()` immediately 
returns empty because its `idToName` route is gone. `SHOW ANALYZE <job_id>` 
therefore displays "Table may get deleted". For a running job, `KILL ANALYZE 
<job_id>` also resolves the table numerically in `AnalysisManager.checkPriv()` 
and can fail before cancellation; `handleKillAnalyzeJob()` has already removed 
its task map, so retry cannot cancel that job either. Preserve the target's 
recoverable numeric route during explicit refresh while evicting names/objects 
and fencing old loads; retire the route when a fresh lookup or guarded provider 
read actually confirms absence. Add an explicit-refresh-then-ID-only analysis 
regression without a named lookup in between.



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