Commit ba671e4
authored
Use rejection exception in ThreadedActionListener (#94363)
Today if the exceptional completion of a `ThreadedActionListener` is
rejected from its executor then the listener is completed with the
original exception on the completing thread, with the exception
representing the rejection added to its suppressed exceptions list. In
practice this is a little trappy, we may want to handle the rejection
differently but won't always remember to check the suppressed exceptions
list for a rejection.
This commit reverses the order of exceptions passed to the delegate
listener in this case: the rejection exception is at the top level, with
the original exception added to its suppressed exceptions list.1 parent 4adc2ae commit ba671e4
File tree
2 files changed
+37
-7
lines changed- server/src
- main/java/org/elasticsearch/action/support
- test/java/org/elasticsearch/action/support
2 files changed
+37
-7
lines changedLines changed: 6 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
75 | | - | |
| 74 | + | |
| 75 | + | |
76 | 76 | | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
| |||
Lines changed: 31 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
50 | 51 | | |
51 | 52 | | |
52 | 53 | | |
53 | | - | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
54 | 84 | | |
55 | 85 | | |
56 | 86 | | |
| |||
0 commit comments