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


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/ExecuteActionCommand.java:
##########
@@ -105,7 +105,8 @@ public void run(ConnectContext ctx, StmtExecutor executor) 
throws Exception {
 
             action.validate(tableNameInfo, ctx.getCurrentUserIdentity());
             ResultSet resultSet = action.execute(table);
-            logRefreshTable(table, System.currentTimeMillis());
+            Env.getCurrentEnv().getRefreshManager()

Review Comment:
   **[P1] Keep the post-commit fence ahead of result rendering**
   
   This helper is reached only after `action.execute()` has converted the 
connector result. Both the single-call procedure and distributed driver can 
finish the remote mutation and then throw from `wrapResult`; 
`executeEnforcesSingleRowWidthInvariant` already proves that 
post-connector-return exception. Before this change, 
`refreshTableCachesAfterMutation()` ran between the connector return and 
`wrapResult`, but this diff deletes that fence. The same failure now leaves the 
executing FE's connector/engine caches stale after a committed 
rollback/expire/rewrite (and returns an error that may be retried). Please 
expose the committed boundary before result conversion so leader invalidation 
remains guaranteed—ideally persisting the follower refresh there too—and add an 
integrated committed-action/invalid-result test.



##########
fe/fe-core/src/main/java/org/apache/doris/catalog/RefreshManager.java:
##########
@@ -99,37 +100,44 @@ public void replayRefreshDb(ExternalObjectLog log) {
         ExternalCatalog catalog = (ExternalCatalog) 
Env.getCurrentEnv().getCatalogMgr().getCatalog(log.getCatalogId());
         if (catalog == null) {
             LOG.warn("failed to find catalog when replaying refresh db: {}", 
log.debugForRefreshDb());
+            return;
+        }
+        String localDbName = log.getDbName();
+        if (Strings.isNullOrEmpty(localDbName)) {

Review Comment:
   **[P1] Preserve replay for legacy ID-only refresh records**
   
   Both new name guards turn older 
`OP_REFRESH_EXTERNAL_DB`/`OP_REFRESH_EXTERNAL_TABLE` records into no-ops. The 
removed code and tests explicitly handled Doris 2.1/3.0 ID-only logs by 
resolving `dbId`/`tableId` through retained mappings (or widening 
invalidation). During a rolling upgrade, an old leader can append such a record 
after an upgraded follower has hot connector, metadata, and row-count caches; 
replay now only warns and leaves stale state until another refresh or TTL. This 
is distinct from the existing name-bearing/zero-ID refresh thread. Please 
retain the ID fallback (or conservatively invalidate a wider scope) and keep 
genuine ID-only replay tests.



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