You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by "georgew5656 (via GitHub)" <gi...@apache.org> on 2023/04/27 20:11:37 UTC

[GitHub] [druid] georgew5656 opened a new pull request, #14178: Make sure the server syncers have ran once before testing

georgew5656 opened a new pull request, #14178:
URL: https://github.com/apache/druid/pull/14178

   There are some build failures (https://github.com/apache/druid/actions/runs/4815370013/jobs/8580557362?pr=14175) due to HttpServerInventoryViewTest.testSyncMonitoring. This PR will hopefully fix those flakey test issues.
   
   ### Description
   I think the test fails occasionally because the test calls serverAdded on three servers and then immediately calls syncMonitoring, assuming that the three recently added servers will be newly synced and the logic in syncMonitoring will skip them.
   
   Calling serverAdded on a server will create a DruidServerHolder for the server and then call start() on the underlying ChangeRequestHttpSyncer object. The start() call will schedule a execution of the sync() method but not guarantee execution before the serverAdded returns. Because of this the unit test can sometimes call syncMonitoring before sync() has been called on all of the ChangeRequestHttpSyncer objects.
   
   This causes serverHolder.syncer.isOK() to return false and eventually leads to the emit call that is failing in the tests.
   
   #### Release note
   Fix to flaky unit test
   
   ##### Key changed/added classes in this PR
   Before calling syncMonitoring, make sure each of the server holders in HttpServerInventory has actually ran sync().
   
   - [X] been self-reviewed.
      - [ ] using the [concurrency checklist](https://github.com/apache/druid/blob/master/dev/code-review/concurrency.md) (Remove this item if the PR doesn't have any relation to concurrency.)
   - [ ] added documentation for new or modified features or behaviors.
   - [ ] a release note entry in the PR description.
   - [ ] added Javadocs for most classes and all non-trivial methods. Linked related entities via Javadoc links.
   - [ ] added or updated version, license, or notice information in [licenses.yaml](https://github.com/apache/druid/blob/master/dev/license.md)
   - [ ] added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader.
   - [X] added unit tests or modified existing tests to cover new code paths, ensuring the threshold for [code coverage](https://github.com/apache/druid/blob/master/dev/code-review/code-coverage.md) is met.
   - [ ] added integration tests.
   - [ ] been tested in a test Druid cluster.
   


-- 
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-unsubscribe@druid.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


[GitHub] [druid] abhishekagarwal87 commented on pull request #14178: Make sure the server syncers have ran once before testing

Posted by "abhishekagarwal87 (via GitHub)" <gi...@apache.org>.
abhishekagarwal87 commented on PR #14178:
URL: https://github.com/apache/druid/pull/14178#issuecomment-1527566086

   never mind. I see that you fixed in another PR :) We would need to backport that PR to 26.0 as well. 


-- 
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-unsubscribe@druid.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


[GitHub] [druid] abhishekagarwal87 commented on pull request #14178: Make sure the server syncers have ran once before testing

Posted by "abhishekagarwal87 (via GitHub)" <gi...@apache.org>.
abhishekagarwal87 commented on PR #14178:
URL: https://github.com/apache/druid/pull/14178#issuecomment-1527562196

   @georgew5656 - seems like a genuine problem. why did you close this? 


-- 
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-unsubscribe@druid.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


[GitHub] [druid] georgew5656 closed pull request #14178: Make sure the server syncers have ran once before testing

Posted by "georgew5656 (via GitHub)" <gi...@apache.org>.
georgew5656 closed pull request #14178: Make sure the server syncers have ran once before testing
URL: https://github.com/apache/druid/pull/14178


-- 
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-unsubscribe@druid.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org