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

   ### What problem does this PR solve?
   
   Issue Number: close #xxx
   
   Related PR: #65658
   
   Problem Summary:
   
   
`AsyncCacheWriteManagerTest.PendingLimitDecreaseKeepsReplacingOldestQueuedTask` 
is flaky in BE UT (e.g. TeamCity build 83717 on #66729):
   
   ```
   ../test/io/cache/async_cache_write_manager_test.cpp:1611
   Expected equality of these values:
     finalized_count
       Which is: 0
     1
   ```
   
   `AsyncCacheWriteManager::_complete_active_task` decrements `_pending_count` 
under the queue mutex and only afterwards calls `task.finalize()`. The test 
polled `pending_count() == 0` and then immediately asserted that every 
finalizer had run, so a worker that had already dropped the counter but not yet 
invoked the callback made the assertion fail.
   
   The finalizers in this test already notify a condition variable, so wait on 
"all finalizers fired" instead of the pending counter; 
`pending_count()`/`pending_bytes()` are asserted afterwards, at which point 
they are deterministically zero.
   
   ### Release note
   
   None
   
   ### Check List (For Author)
   
   - Test
       - [x] Unit Test
       - [x] No need to test or manual test. Explain why:
           - [x] Other reason: test-only change; the modified test is the one 
being de-flaked.
   
   - Behavior changed:
       - [x] No.
   
   - Does this need documentation?
       - [x] No.
   
   ### Check List (For Reviewer who merge this PR)
   
   - [ ] Confirm the release note
   - [ ] Confirm test cases
   - [ ] Confirm document
   - [ ] Add branch pick label
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   
   https://claude.ai/code/session_01MF47F6LbC23gjVLoRqozK5
   


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