Akshat-Jain opened a new pull request, #20426:
URL: https://github.com/apache/druid/pull/20426

   ### Description
   
   This PR fixes flaky `TaskQueueScaleTest.doMassLaunchAndExit`. Sample 
failure: 
https://github.com/apache/druid/actions/runs/36084362652/job/107912839489
   
   ```
      🧪 - 
indexing-service/target/test-classes/org/apache/druid/indexing/overlord/TaskQueueScaleTest.class
 | all tasks should be known ==> expected: <1000> but was: <973>
     Error: all tasks should be known ==> expected: <1000> but was: <973>
   ```
   
   `TaskQueueScaleTest.doMassLaunchAndExit` reads the running, pending and 
waiting counts at three separate instants while the `TaskQueue-Manager` thread 
is still submitting tasks to the runner. Since `getWaitingTaskCount()` counts 
active tasks the runner does *not* know about, a task that crosses 
`taskRunner.run()` between the pending read and the waiting read is counted by 
neither, so the sum comes up short (`expected: <1000> but was: <988>`).
   
   The test had a high failure rate without this PR change. With this PR 
change, I ran the test 100 times locally, it passes everytime.
   
   <hr>
   
   This PR has:
   
   - [x] been self-reviewed.
   


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