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


##########
fe/fe-core/src/main/java/org/apache/doris/datasource/CatalogMgr.java:
##########
@@ -1050,6 +1050,10 @@ public void addExternalPartitions(String catalogName, 
String dbName, String tabl
         }
 
         HMSExternalTable hmsTable = (HMSExternalTable) table;
+        // The metastore mutation has already committed when this event is 
handled. Fence the
+        // independent row-count cache even when the local partition cache 
cannot represent the
+        // table and this method returns early.
+        
Env.getCurrentEnv().getExtMetaCacheMgr().invalidateRowCountCache(hmsTable);

Review Comment:
   [P1] Fence cold partition events before these nullable lookups. HMS handlers 
call this with `ignoreIfNotExists=true`, but a table evicted from the metadata 
cache is rebuilt through `getTableNullable`; `buildTableForInit` turns ordinary 
remote list/existence failures into `null`, so this method returns above and 
`MetastoreEventsProcessor` advances the already-committed event. The row-count 
cache can outlive the table-object cache, so the pre-event count remains 
publishable until expiry. Publish a name-based or conservative DB fence on the 
ignored-null path (the same ordering exists in `dropExternalPartitions` and 
`RefreshManager.refreshPartitions`), and cover an evicted table plus reload 
failure. This is distinct from the unsupported-table and post-lookup 
cache-failure threads.



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