ygerzhedovich commented on code in PR #3447:
URL: https://github.com/apache/ignite-3/pull/3447#discussion_r1540991452
##########
modules/core/src/main/java/org/apache/ignite/internal/util/subscription/OrderedMergePublisher.java:
##########
@@ -410,4 +405,33 @@ public void cancel() {
}
}
}
+
+ private static class ErrorChain {
+ private final Throwable error;
+ @Nullable
+ private final ErrorChain next;
+
+ private final AtomicBoolean built = new AtomicBoolean(false);
+
+ private ErrorChain(Throwable error, @Nullable ErrorChain next) {
+ this.error = error;
+ this.next = next;
+ }
+
+ Throwable buildThrowable() {
+ if (!built.compareAndSet(false, true)) {
+ // Already built, so error already contains all subsequent
exceptions attached.
Review Comment:
it's a false. You can return not fully constructed `error`, due to flag
amended before the `error` will be constructed.
--
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]