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


##########
fe/fe-core/src/main/java/org/apache/doris/mtmv/ivm/IvmDeltaRewriteState.java:
##########
@@ -116,8 +124,34 @@ private static IvmDeltaRewriteState create(Plan plan, 
IvmIncrRefreshContext ctx,
             }
         }
         applyScopePartitionIds(windowPartitionIdsByTable, planTables, 
scopePartitionIds);
-        return new IvmDeltaRewriteState(streams, 
ctx.isIncludeExhaustedStreams(), sequenceCalculator,
-                windowPartitionIdsByTable);
+        IvmDeltaRewriteState state = new IvmDeltaRewriteState(streams, 
ctx.isIncludeExhaustedStreams(),

Review Comment:
   [P1] Fetching Cloud Table Stream read states here performs a blocking Meta 
Service RPC while Nereids holds all collected table read locks. 
`collectAndLockTable()` acquires `StatementContext` read locks before the 
analyzer runs, and those locks are released only after planning; this new 
`fetchCloudReadStates()` call therefore holds them for the full 
`meta_service_brpc_timeout_ms` if Meta Service is slow or unavailable, stalling 
writes/DDL on every base table during an IVM refresh. Move the state 
acquisition outside the table-lock scope (or reuse a state captured by the 
existing hook) while preserving the same statement boundary.



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