-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ensure ResultMessage is processed #4135
Ensure ResultMessage is processed #4135
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4135 +/- ##
=========================================
- Coverage 86.17% 81.28% -4.9%
=========================================
Files 151 151
Lines 7271 7272 +1
Branches 469 468 -1
=========================================
- Hits 6266 5911 -355
- Misses 1005 1361 +356
Continue to review full report at Codecov.
|
50ebe7a
to
8e16768
Compare
@jiangpengcheng Thanks a lot for tackling this issue again. |
@cbickel or don't create promise for non-blocking activations, just return an |
d9003df
to
5138507
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thanks a lot for doing this PR and simplifying it.
Ah wait. One more thing came into my mind. Do we still need to store the promise in the |
yes, we don't need that promise |
@cbickel ,can be merged? |
sendActivationToInvoker(messageProducer, msg, invoker).map { _ => | ||
entry.promise.future | ||
if (msg.blocking) { | ||
blockingPromises.getOrElseUpdate(msg.activationId, Promise[Either[ActivationId, WhiskActivation]]()).future |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
while not likely, it's plausible the active ack is received before the promise is added to this map (which is why setup activation adds the promise before it's posted to any invoker).
Description
As
processCompeltion
andprocessResult
is executed asynchronously, it's better to ensureResultMessage
will be processed in any caseRelated issue and scope
processAcknowledgement
may processCompletionMessage
first for blocking incovation even the message is sent ahead ofResultMessage
#4134 )My changes affect the following components
Types of changes
Checklist: