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

   
   ### Background:
   The previous scheduling logic for calculating the first trigger time had the 
following issues:
   
   If the current time (currentTimeMs) exceeds the start of the time window 
(windowStartTimeMs), the first trigger time could be skipped, causing some 
tasks to be missed. Minor delays during code execution (e.g., between window 
initialization and scheduling logic execution) could result in tasks being 
missed within the active time window. ### Solution:
   
   - Adjustment of First Trigger Time Logic:
   
    When the initially calculated firstTriggerTime is less than or equal to the 
currentTimeMs, compute the number of missed intervals and directly adjust to 
the largest trigger time that is less than the currentTimeMs.
   - Single-Time Compensation Logic:
   
    Introduced a compensation mechanism to handle the slight delay caused by 
code execution. This ensures that tasks missed during the initialization phase 
are correctly scheduled.
   The compensation is explicitly single-time to avoid impacting the normal 
scheduling logic.
   
   
   
   ### Check List (For Author)
   
   - Test <!-- At least one of them must be included. -->
       - [ ] Regression test
       - [ ] Unit Test
       - [ ] Manual test (add detailed scripts or steps below)
       - [ ] No need to test or manual test. Explain why:
           - [ ] This is a refactor/code format and no logic has been changed.
           - [ ] Previous test can cover this change.
           - [ ] No code files have been changed.
           - [ ] Other reason <!-- Add your reason?  -->
   
   - Behavior changed:
       - [ ] No.
       - [ ] Yes. <!-- Explain the behavior change -->
   
   - Does this need documentation?
       - [ ] No.
       - [ ] Yes. <!-- Add document PR link here. eg: 
https://github.com/apache/doris-website/pull/1214 -->
   
   ### Check List (For Reviewer who merge this PR)
   
   - [ ] Confirm the release note
   - [ ] Confirm test cases
   - [ ] Confirm document
   - [ ] Add branch pick label <!-- Add branch pick label that this PR should 
merge into -->
   
   


-- 
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: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to