-
Notifications
You must be signed in to change notification settings - Fork 140
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
fix: proper path when promise actor terminated quickly #1156
fix: proper path when promise actor terminated quickly #1156
Conversation
LGTM. |
Better with a bug report here too. |
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.
Looks reasonable to me!
senderRef ! "complete" | ||
p.ref ! senderRef | ||
} | ||
}), "pathPrefix") |
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.
For this test, I think we would better test it several times with some generated pathPrefixs.
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.
random str is ok?
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.
I don't think it's necessary to verify the pathPrefixs
several times, because this is not a flaky behavior.
After investigation, I think it is a clear bug, and the unit test explicitly verifies this. Let me explain:
The reason why the path is correct after adding STDOUT is because toString
is called path
Which initialized the path with refPathPrefix(correctly path):
But when toString is not called in the messageFactory
function apply, all this will not happen. When the Actor terminated, the method call to the path will generate a path without refPathPrefix (that is the place of the bug, and the place where the PR is fixed)
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.
We completed the ask future(which made PromiseActor terminated) on the Actor message handler and then sent PromiseActorRef to the probe for saving reference.
I think the test was enough for this bug. What do you think? @laglangyue @He-Pin
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.
for me, it's enough for the bugfix.
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, but it would be better with some generated data other than "pathPrefix"
in test
Once this gets merged, should backport to 1.0.x too. |
I am not sure that this would get classified as a critical fix, @pjfanning @raboof wdyt? |
I don't see a strong reason to backport in this case |
solve #1157
self-explanatory