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


##########
fe/fe-core/src/main/java/org/apache/doris/datasource/hive/HiveMetadataOps.java:
##########
@@ -346,8 +346,10 @@ public void afterTruncateTable(String dbName, String 
tblName, long updateTime) {
                 if (tbl.isPresent()) {
                     Env.getCurrentEnv().getRefreshManager()
                             .refreshTableInternal(db.get(), (ExternalTable) 
tbl.get(), updateTime);
+                    return;
                 }
             }
+            
Env.getCurrentEnv().getExtMetaCacheMgr().invalidateTable(catalog.getId(), 
dbName, tblName);

Review Comment:
   [P1] Canonicalize this cold-TRUNCATE fallback before routing it. 
`TruncateTableInfo` stores the caller's DB/table spelling, while Hive cache 
keys use canonical local names and invalidation compares those names exactly 
(and hashes them for file entries). With `lower_case_database_names=2` or 
`lower_case_table_names=2`, a follower whose DB is cached but table object was 
evicted reaches this fallback with alternate casing: the row-count fallback 
widens to the DB, but schema/partition/file invalidation misses the canonical 
keys, so post-TRUNCATE reads can reuse stale file listings until expiry. Carry 
the resolved local names (or invalidate the canonical DB scope), and add a 
mixed-case cold-replay test with primed Hive caches.



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