You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by "vldpyatkov (via GitHub)" <gi...@apache.org> on 2025/11/19 08:14:16 UTC
[PR] IGNITE-26950 Causality token mismatch error when zone creation [ignite-3]
vldpyatkov opened a new pull request, #7009:
URL: https://github.com/apache/ignite-3/pull/7009
https://issues.apache.org/jira/browse/IGNITE-26950
--
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: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-26950 Causality token mismatch error when zone creation [ignite-3]
Posted by "vldpyatkov (via GitHub)" <gi...@apache.org>.
vldpyatkov merged PR #7009:
URL: https://github.com/apache/ignite-3/pull/7009
--
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: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-26950 Causality token mismatch error when zone creation [ignite-3]
Posted by "denis-chudov (via GitHub)" <gi...@apache.org>.
denis-chudov commented on code in PR #7009:
URL: https://github.com/apache/ignite-3/pull/7009#discussion_r2542442036
##########
modules/core/src/main/java/org/apache/ignite/internal/causality/BaseVersionedValue.java:
##########
@@ -378,18 +383,22 @@ public void removeWhenDelete(DeletionListener<T> action) {
/**
* Notifies completion listeners.
*/
- private void notifyCompletionListeners(long causalityToken, CompletableFuture<T> future) {
- future.whenComplete((v, t) -> {
+ private CompletableFuture<Void> notifyCompletionListeners(long causalityToken, CompletableFuture<T> future) {
+ return future.handle((v, t) -> {
Throwable unpackedThrowable = t instanceof CompletionException ? t.getCause() : t;
+ ArrayList<CompletableFuture<?>> futs = new ArrayList<>();
+
for (CompletionListener<T> listener : completionListeners) {
try {
- listener.whenComplete(causalityToken, v, unpackedThrowable);
+ futs.add(listener.whenComplete(causalityToken, v, unpackedThrowable));
} catch (Exception e) {
log.error("Exception when notifying a completion listener", e);
}
}
- });
+
+ return CompletableFutures.allOf(futs);
+ }).thenCompose(identity());
Review Comment:
Now the exception in any `whenComplete` closure may be propagated to watch listener and trigger failure handler, is it exactly what we want?
--
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: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-26950 Causality token mismatch error when zone creation [ignite-3]
Posted by "vldpyatkov (via GitHub)" <gi...@apache.org>.
vldpyatkov commented on code in PR #7009:
URL: https://github.com/apache/ignite-3/pull/7009#discussion_r2542481506
##########
modules/core/src/main/java/org/apache/ignite/internal/causality/BaseVersionedValue.java:
##########
@@ -378,18 +383,22 @@ public void removeWhenDelete(DeletionListener<T> action) {
/**
* Notifies completion listeners.
*/
- private void notifyCompletionListeners(long causalityToken, CompletableFuture<T> future) {
- future.whenComplete((v, t) -> {
+ private CompletableFuture<Void> notifyCompletionListeners(long causalityToken, CompletableFuture<T> future) {
+ return future.handle((v, t) -> {
Throwable unpackedThrowable = t instanceof CompletionException ? t.getCause() : t;
+ ArrayList<CompletableFuture<?>> futs = new ArrayList<>();
+
for (CompletionListener<T> listener : completionListeners) {
try {
- listener.whenComplete(causalityToken, v, unpackedThrowable);
+ futs.add(listener.whenComplete(causalityToken, v, unpackedThrowable));
} catch (Exception e) {
log.error("Exception when notifying a completion listener", e);
}
}
- });
+
+ return CompletableFutures.allOf(futs);
+ }).thenCompose(identity());
Review Comment:
I think, that is.
The method is used only for internal code; if the closure can be a source of exceptional behavior, we can wrap it in a try-catch block.
--
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: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org