-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Fix](job)Fix for Duplicate Scheduling of Tasks (#46872)
### Problem Description The current scheduling logic calculates the next scheduled time and adds it to the task queue when the condition triggerTime <= windowEndTimeMs is met. However, this can lead to a task being scheduled twice if its triggerTime is exactly equal to windowEndTimeMs: - The task is added to the current scheduling window. - At the same time, this timestamp becomes the startTime for the next scheduling window, causing the task to be scheduled again. ### Changes Made Updated the condition from triggerTime <= windowEndTimeMs to triggerTime < windowEndTimeMs. This ensures that the scheduling time doesn’t overlap with the window’s end time, preventing duplicate scheduling.
- Loading branch information
1 parent
1f9e426
commit 77aadf1
Showing
2 changed files
with
57 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters