You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by GitBox <gi...@apache.org> on 2022/10/12 12:33:09 UTC

[GitHub] [ignite-3] rpuch opened a new pull request, #1198: IGNITE-17881 OrderingFuture should notify dependents asynchronously

rpuch opened a new pull request, #1198:
URL: https://github.com/apache/ignite-3/pull/1198

   https://issues.apache.org/jira/browse/IGNITE-17881


-- 
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


[GitHub] [ignite-3] ibessonov merged pull request #1198: IGNITE-17881 OrderingFuture should notify dependents asynchronously

Posted by GitBox <gi...@apache.org>.
ibessonov merged PR #1198:
URL: https://github.com/apache/ignite-3/pull/1198


-- 
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


[GitHub] [ignite-3] sashapolo commented on a diff in pull request #1198: IGNITE-17881 OrderingFuture should notify dependents asynchronously

Posted by GitBox <gi...@apache.org>.
sashapolo commented on code in PR #1198:
URL: https://github.com/apache/ignite-3/pull/1198#discussion_r993491126


##########
modules/core/src/main/java/org/apache/ignite/internal/future/OrderingFuture.java:
##########
@@ -140,20 +147,56 @@ private void completeInternal(@Nullable T result, @Nullable Throwable ex) {
         if (!completionStarted.compareAndSet(false, true)) {
             // Someone has already started the completion. We must leave as the following code can produce duplicate
             // notifications of dependents if executed by more than one thread.
+
+            // But let's wait for completion first as it would be strange if someone calls completion and then manages
+            // to see that getNow() returns the fallback value.
+            waitForCompletionValuesVisibility();
+
             return;
         }
 
-        State<T> prevState;
-        ListNode<T> lastNotifiedNode = null;
+        assert state.phase == Phase.INCOMPLETE;
+
+        switchToNotyfyingStage(result, ex);

Review Comment:
   ```suggestion
           switchToNotifyingStage(result, ex);
   ```



-- 
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