rhalm opened a new pull request, #10581:
URL: https://github.com/apache/ozone/pull/10581

   ## What changes were proposed in this pull request?
   
   Previously in HDDS-10604 there were changes made to `OzoneConfiguration` 
initialization that briefly increased the cost of constructing a new instance, 
which caused `TestSnapshotDiffManager#testThreadPoolIsFull` to fail in the 
no-wait-between-batches scenario. That change was reverted later, but it 
exposed two issues that are addressed by this PR:
   
   - `testThreadPoolIsFull` relied on timing (using `Thread.sleep`) to verify 
pool rejection behavior under load, making the test fragile to any potential 
latency in the snapshot diff submission path (such as ozone config 
initialization). The test was rewritten to use a `CountDownLatch`, making the 
IN_PROGRESS/REJECTED split deterministic.
   - `getSnapshotRootPath` constructed a `new OzoneConfiguration()` on every 
call just to build a path. It now uses `ozoneManager.getConfiguration()` 
instead.
   
   ## What is the link to the Apache JIRA
   
   https://issues.apache.org/jira/browse/HDDS-11063
   
   ## How was this patch tested?
   
   - Reproduced the fragility by adding a 10 ms delay to the 
`OzoneConfiguration` constructor: the old test fails on master, the fixed test 
consistently passes with the same setup.
   - CI run: https://github.com/rhalm/ozone/actions/runs/27956879008
   - flaky-test-check on this branch: 
https://github.com/rhalm/ozone/actions/runs/27959048712 (all passed)
   
   


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