hello-stephen commented on code in PR #71451:
URL: https://github.com/apache/doris/pull/71451#discussion_r4808528301


##########
fe/fe-core/src/main/java/org/apache/doris/job/extensions/mtmv/MTMVTask.java:
##########
@@ -1323,6 +1348,14 @@ private boolean 
executePartitionBasedRefresh(MTMVRefreshContext refreshContext,
             }
             throw new JobException(partitionPlan.fallbackReason);
         }
+        if (fallingBack && mtmv.isIvm() && 
isRowLevelAggFallbackReason(ivmFallbackReason)
+                && request.allowFallback && 
!canUsePartialPartitionFallback(partitionPlan.partitions)) {

Review Comment:
   [P2] Verify the partition scope against the failed delta
   
   In cloud mode, consider a PCT MIN view where the FE sees an append in p1, 
but its cached version for p2 still predates a committed delete of the retained 
minimum. The p1 append makes the delta scan run. 
`CloudTableStreamReadStateHook` pins Meta Service read states for both 
partitions, so the delta sees the p2 delete and hits the boundary guard. 
Rebuilding the refresh context can still use the unexpired p2 cache entry 
through `CloudPartition.getSnapshotVisibleVersion`. The new gate then accepts 
p1 alone, and the task reports success without recomputing p2 or consuming its 
delete. Compare the planned scope with authoritative versions or the failed 
delta’s read set, and continue to COMPLETE if the plan cannot be shown to cover 
the failed work.



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