You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bookkeeper.apache.org by "hangc0276 (via GitHub)" <gi...@apache.org> on 2023/03/12 02:10:38 UTC

[GitHub] [bookkeeper] hangc0276 opened a new pull request, #3857: [Flaky] Fix flaky test in testRaceGuavaEvictAndReleaseBeforeRetain

hangc0276 opened a new pull request, #3857:
URL: https://github.com/apache/bookkeeper/pull/3857

   ### Motivations
   The unit test `testRaceGuavaEvictAndReleaseBeforeRetain` sometimes runs timeout https://github.com/apache/bookkeeper/actions/runs/4382055343/jobs/7670828738
   
   The root cause is that two threads sleep same time to run the logic, which leads to them interacting with each other and can't exit the while loop.
   https://github.com/apache/bookkeeper/blob/cd43c91addb252f139cc207fe10adbb9344f9590/bookkeeper-server/src/test/java/org/apache/bookkeeper/bookie/FileInfoBackingCacheTest.java#L255-L260
   
   Due to the guavaCache size being one, when a new item putting into the cache, it will evict the previous one. The while loop can't exit with the following steps.
   ```
   - Thread 1 put item A into the cache
   - Thread 1 runs into sleep 100ms
   - Thread 2 trigger evict item A from the cache
   - Thread 2 put item B into the cache
   - Thread 2 runs into sleep 100ms
   - Thread 1 wake up, check item A's status, and found it has been released
   - Thread 1 create a new item A and try to put it into the cache
   - Thread 1 trigger evict item B from the cache.
   - Thread 1 put item A into the cache
   - Thread 1 runs into sleep 100ms
   - Thread 2 woke up, check item B's status, and found it has been released.
   - ...
   ```
   
   ### Modifications
   Change the thread sleep time to a random value to break the dead loop logic.
   


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

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


[GitHub] [bookkeeper] codecov-commenter commented on pull request #3857: [Flaky] Fix flaky test in testRaceGuavaEvictAndReleaseBeforeRetain

Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #3857:
URL: https://github.com/apache/bookkeeper/pull/3857#issuecomment-1465075561

   ## [Codecov](https://codecov.io/gh/apache/bookkeeper/pull/3857?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#3857](https://codecov.io/gh/apache/bookkeeper/pull/3857?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (d4b26a9) into [master](https://codecov.io/gh/apache/bookkeeper/commit/cd43c91addb252f139cc207fe10adbb9344f9590?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (cd43c91) will **decrease** coverage by `23.16%`.
   > The diff coverage is `n/a`.
   
   ```diff
   @@              Coverage Diff              @@
   ##             master    #3857       +/-   ##
   =============================================
   - Coverage     44.17%   21.01%   -23.16%     
   + Complexity     4384     2026     -2358     
   =============================================
     Files           473      473               
     Lines         40982    40982               
     Branches       5241     5241               
   =============================================
   - Hits          18102     8611     -9491     
   - Misses        20994    31106    +10112     
   + Partials       1886     1265      -621     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | client | `?` | |
   | tls | `21.01% <ø> (?)` | |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   [see 264 files with indirect coverage changes](https://codecov.io/gh/apache/bookkeeper/pull/3857/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   :mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   


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

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


[GitHub] [bookkeeper] merlimat merged pull request #3857: [Flaky] Fix flaky test in testRaceGuavaEvictAndReleaseBeforeRetain

Posted by "merlimat (via GitHub)" <gi...@apache.org>.
merlimat merged PR #3857:
URL: https://github.com/apache/bookkeeper/pull/3857


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

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