yujun777 opened a new pull request, #67710:
URL: https://github.com/apache/doris/pull/67710

   The shared MTMV task waits (`waitingMTMVTaskFinishedByMvName`, 
`waitingMTMVTaskFinishedByMvNameAllowCancel`, `waitingMTMVTaskFinished`, 
`waitingMTMVTaskFinishedWithoutAnalyze`, 
`waitingMTMVTaskFinishedNotNeedSuccess`) read the newest row of 
`tasks('type'='mv')` with `order by CreateTime DESC limit 1` and trusted it as 
the task they had just submitted. A task that just finished is briefly missing 
from that list: the job removes it from its running list before the MV history 
gets it, so a poll that lands in that window reads the previous task of the 
same MV, whose status is already terminal. The committed-not-visible regression 
hit this on CI (expected SUCCESS but read the previous FAILED task).
   
   Key changes:
   - Add `pollMTMVTaskTerminal()`: a terminal row is trusted only when the same 
task was seen running by this wait, or is seen terminal twice in a row and no 
earlier wait in the suite returned it (so a wait cannot latch onto an 
already-reported task).
   - The five `waitingMTMVTaskFinished*` helpers now share that wait instead of 
five copies of the polling loop; their SQL, logging, assertions and analyze 
step are unchanged.
   - Add `SuiteMTMVTaskWaitTest` covering a task seen running, a terminal row 
that needs confirmation, the previous task showing through the gap, and a 
repeated wait for a task that already finished (bounded fallback).
   
   Tests:
   - Framework unit tests pass (incl. the new `SuiteMTMVTaskWaitTest`).
   - `test_ivm_agg_previous_commit_not_visible` (mtmv_p0/ivm) passes; smoke 
runs of `test_ivm_bitmap_agg_1`, `test_ivm_chained_mtmv_2` and `test_ivm_agg_3` 
pass.
   


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