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


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/insert/HiveInsertExecutor.java:
##########
@@ -91,6 +91,7 @@ protected void doAfterCommit() throws DdlException {
             HiveExternalMetaCache cache = 
Env.getCurrentEnv().getExtMetaCacheMgr()
                     .hive(hmsTable.getCatalog().getId());
             cache.refreshAffectedPartitions(hmsTable, partitionUpdates, 
modifiedPartNames, newPartNames);
+            
Env.getCurrentEnv().getExtMetaCacheMgr().invalidateRowCountCache(hmsTable);

Review Comment:
   Fixed in 833c487d52a. The committed Hive insert now fences row-count state 
before fallible partition-cache refresh. A refresh failure is handled as 
post-commit cleanup: it falls back to full table invalidation and still writes 
a full-refresh edit log for follower FEs. The drop-event and replay paths now 
fence row counts before their partition-cache calls. Added throwing-refresh 
regression coverage in HiveInsertExecutorTest, CatalogMgrTest, and 
RefreshManagerTest.



##########
fe/fe-core/src/main/java/org/apache/doris/datasource/ExternalCatalog.java:
##########
@@ -424,7 +425,8 @@ private void buildMetaCache() {
                     localDbName -> Optional.ofNullable(
                             buildDbForInit(null, localDbName, 
Util.genIdByName(name, localDbName), logType,
                                     true)),
-                    (key, value, cause) -> value.ifPresent(v -> 
v.resetMetaToUninitialized()));
+                    (key, value, cause) -> value.ifPresent(
+                            v -> 
v.resetMetaToUninitialized(!invalidatingAllMetaCache)));

Review Comment:
   Fixed in 833c487d52a. For onRefreshCache(true), the manager-level 
invalidateCatalog call is now the sole catalog row-count invalidation owner, so 
normal and scheduled REFRESH CATALOG perform one global scan. 
onRefreshCache(false) retains the local row-count invalidation required by 
reset-only callers. Added tests for both ownership paths.



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