Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #8773 +/- ##
============================================
- Coverage 91.29% 91.28% -0.01%
- Complexity 10498 10533 +35
============================================
Files 1006 1008 +2
Lines 28338 28476 +138
Branches 3581 3620 +39
============================================
+ Hits 25870 25994 +124
- Misses 1675 1685 +10
- Partials 793 797 +4 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Pull request dashboard statusMerged · refreshed 2026-09-14 19:13 UTC Status above doesn't look right?
|
28f8686 to
ee78eb3
Compare
We should do this, plus logging for all exceptions. Also, let's catch Exception, not Throwable. That will mean that errors (i.e. Throwables which are not Exceptions) bubble up and violate the "allOf" completion guarantee. But this seems fine and defensible. Also, your PR description is too verbose. The key details are watered down by the noise of details like which specific test cases were added, which is self explanatory from the code. Less is more. I recommend writing PR descriptions/comments yourself, rather than relying on AI. |
ee78eb3 to
4afc49d
Compare
thanks @jack-berg for comment. I have updated the code and description. Please check |
Fixes open-telemetry#8771 Signed-off-by: amit306 <amit.anand0312@gmail.com>
4afc49d to
e3c69b7
Compare
Fixes #8771
Problem
CompletableResultCode#succeed and failInternal run completion actions while holding a lock. This can cause a deadlock if two actions try to complete each other. Also, if an action throws an exception, the remaining actions are skipped and the result may never complete.
Solution
Both methods now use a shared complete method. It updates the result and copies the actions while holding the lock, then releases the lock before running them. runActions logs each exception, continues running the remaining actions, and rethrows the first exception at the end. whenComplete also uses runActions when the result is already complete.