tkalkirill commented on code in PR #2581:
URL: https://github.com/apache/ignite-3/pull/2581#discussion_r1324155351
##########
modules/core/src/main/java/org/apache/ignite/internal/streamer/StreamerSubscriber.java:
##########
@@ -223,13 +225,7 @@ private void close(@Nullable Throwable throwable) {
var futs = pendingRequests.values().toArray(new
CompletableFuture[0]);
- CompletableFuture.allOf(futs).whenComplete((res, err) -> {
- if (err != null) {
- completionFut.completeExceptionally(err);
- } else {
- completionFut.complete(null);
- }
- });
+
CompletableFuture.allOf(futs).whenComplete(copyStateTo(completionFut));
Review Comment:
If you got in, then it’s better to do it, and not half-measure.
You can do it on a separate ticket (trollface)
##########
modules/core/src/main/java/org/apache/ignite/internal/streamer/StreamerSubscriber.java:
##########
@@ -223,13 +225,7 @@ private void close(@Nullable Throwable throwable) {
var futs = pendingRequests.values().toArray(new
CompletableFuture[0]);
- CompletableFuture.allOf(futs).whenComplete((res, err) -> {
- if (err != null) {
- completionFut.completeExceptionally(err);
- } else {
- completionFut.complete(null);
- }
- });
+
CompletableFuture.allOf(futs).whenComplete(copyStateTo(completionFut));
Review Comment:
If you got in, then it’s better to do it, and not half-measure.
You can do it on a separate ticket (trollface)
--
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]