You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "yandrey321 (via GitHub)" <gi...@apache.org> on 2026/10/12 19:15:58 UTC
[PR] HDDS-16747. Fix intermittent timeout in testBucketLockWithPurgeDirectory [ozone]
yandrey321 opened a new pull request, #11497:
URL: https://github.com/apache/ozone/pull/11497
## What changes were proposed in this pull request?
`TestOMDirectoriesPurgeRequestAndResponse#testBucketLockWithPurgeDirectory` intermittently fails after 30s with
`TimeoutException: Timed out waiting for condition`, thrown from the test's own `GenericTestUtils.waitFor` gate in
the spied `acquireWriteLocks`.
The test runs two directory purge requests concurrently with opposite bucket orders. A gate keyed on thread id lets
a thread take a second bucket lock only after both threads have taken their first one. This forces the interleaving
that deadlocked before HDDS-13729. The two requests were started with `CompletableFuture.runAsync(...)` on the
ForkJoin common pool, which does not guarantee two distinct threads. If the first request finished before the second
was picked up, the same worker ran the second one. Its thread id was already recorded and the set size stayed at 1,
so the gate waited out the full 30s.
The fix runs both requests on a dedicated 2-thread executor, so each request gets its own thread. The gate is
unchanged and still guards against the HDDS-13729 lock-ordering deadlock. This is a test-only change.
Generated-by: Claude Code (Claude Opus 5.5)
## What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-16747
## How was this patch tested?
- Confirmed the root cause: with a single-thread executor, the test fails the same way as the Jira
(`TimeoutException` after ~32s).
- With the fix: `TestOMDirectoriesPurgeRequestAndResponse` 13/13 pass, and the method passed 10/10 consecutive runs
(~2.2s each).
--
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: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-16747. Fix intermittent timeout in testBucketLockWithPurgeDirectory [ozone]
Posted by "smengcl (via GitHub)" <gi...@apache.org>.
smengcl merged PR #11497:
URL: https://github.com/apache/ozone/pull/11497
--
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: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-16747. Fix intermittent timeout in testBucketLockWithPurgeDirectory [ozone]
Posted by "smengcl (via GitHub)" <gi...@apache.org>.
smengcl commented on PR #11497:
URL: https://github.com/apache/ozone/pull/11497#issuecomment-6179625615
Thanks @yandrey321 for the patch. Thanks @jojochuang for the review.
--
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: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org