You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@asterixdb.apache.org by AsterixDB Code Review <do...@asterix-gerrit.ics.uci.edu> on 2026/10/21 22:38:09 UTC
[M] Change in asterixdb[trinity]: [NO ISSUE][API] Identify Exception cause/hierarchy correctly
From Ali Alsuliman <al...@gmail.com>:
Attention is currently required from: Ali Alsuliman, Michael Blow.
Hello Anon. E. Moose #1000171, Jenkins, Michael Blow,
I'd like you to reexamine a change. Please visit
https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/21738?usp=email
to look at the new patch set (#4).
The following approvals got outdated and were removed:
Contrib-2 by Anon. E. Moose #1000171, Integration-Tests+1 by Jenkins
Change subject: [NO ISSUE][API] Identify Exception cause/hierarchy correctly
......................................................................
[NO ISSUE][API] Identify Exception cause/hierarchy correctly
Walk full cause chain:
ExceptionUtils.matchingCause computed each step from the pointer it was
about to overwrite, so cause and current converged after one iteration
and the walk stopped there. Only the throwable and its immediate cause
were ever tested, despite the method documenting a search of the whole
hierarchy.
Advancing the cause pointer instead walks correctly but would spin on a
cyclic chain: the previous cause != current guard could only catch
self-causation, which getCause() already reports as null. Trail a
second pointer at half speed so that a cycle terminates.
The causes are still tested nearest-first and the throwable itself
last, since a caller whose predicate records the candidate it matched
depends on that order.
Terminate cause walks on a cycle:
getRootCause and unwrap advance their pointers correctly, but the
cause != current guard each one carries can only catch self-causation,
which getCause() already reports as null. A chain whose links cause one
another therefore spins forever rather than being detected.
Trail a second pointer at half speed in both, as matchingCause now
does. causedByInterrupt is covered by the same change, since it reads
the root cause.
A cyclic chain takes deliberate initCause use to build, so this is
hardening rather than a fix for anything observed.
Ext-ref: MB-74646
Generated-by: Claude Opus 5.5 <no...@anthropic.com>
Change-Id: Ic61266156604b16b3b9eef4f433911d6fbc42720
---
M hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/util/ExceptionUtils.java
A hyracks-fullstack/hyracks/hyracks-api/src/test/java/org/apache/hyracks/api/util/ExceptionUtilsTest.java
2 files changed, 214 insertions(+), 10 deletions(-)
git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb refs/changes/38/21738/4
--
To view, visit https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/21738?usp=email
To unsubscribe, or for help writing mail filters, visit https://asterix-gerrit.ics.uci.edu/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: asterixdb
Gerrit-Branch: trinity
Gerrit-Change-Id: Ic61266156604b16b3b9eef4f433911d6fbc42720
Gerrit-Change-Number: 21738
Gerrit-PatchSet: 4
Gerrit-Owner: Ali Alsuliman <al...@gmail.com>
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Michael Blow <mb...@apache.org>
Gerrit-Attention: Ali Alsuliman <al...@gmail.com>
Gerrit-Attention: Michael Blow <mb...@apache.org>