Skip to content
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

[FLINK-4382] Buffer rpc calls until the RpcEndpoint has been started #2358

Closed
wants to merge 1 commit into from

Conversation

tillrohrmann
Copy link
Contributor

This PR allows the AkkaRpcActor to stash messages until the corresponding RcpEndpoint
has been started. When receiving a Processing.START message, the AkkaRpcActor
unstashes all messages and starts processing rpcs. When receiving a Processing.STOP
message, it will stop processing messages and stash incoming messages again.

This PR is based on #2357.

R @StephanEwen

@StephanEwen
Copy link
Contributor

Not completely sure about the message stashing. Why not drop the messages? That would be safer (less to clean up, no overflow).

Is this mainly to not loose the messages from the "self gateway"? Because for all remote messages, it should be not necessary, it should simply appear as if the actor/endpoint started a few milliseconds later.

It may in the common case not be much of an issue, as the period during which messages are stashed is small, but I think it is simply not necessary.

@tillrohrmann
Copy link
Contributor Author

Dropping is also a solution. I think this will also happen implicitly if the mailbox grows too big.

Stashing has the advantage that we try (on a best effort basis) to answer early requests. That way the rpc calls won't have to time out on the sending side before being retried or alternative measures are taken. Of course this can happen if the start up takes too long on the server side. Thus, I would imagine that this approach is a little bit more responsive wrt early rpcs.

So I don't think that stashing actually hurts.

@tillrohrmann
Copy link
Contributor Author

The stashing is a feature which comes for free with Akka. Of course the sending side should not rely on this behaviour when implementing its failure treatment. But in cases where we have a race condition between the start-up of the RpcEndpoint and a RpcGateway it should result into a slightly more forgiving receiver behaviour.

I will rebase the PR and if Travis gives green light I would like to merge this PR to the flip-6 feature branch if nobody objects.

@tillrohrmann tillrohrmann force-pushed the messageStashing branch 5 times, most recently from 770e64d to 62d6ce3 Compare August 16, 2016 12:13
…arted

This PR allows the AkkaRpcActor to stash messages until the corresponding RcpEndpoint
has been started. When receiving a Processing.START message, the AkkaRpcActor
unstashes all messages and starts processing rpcs. When receiving a Processing.STOP
message, it will stop processing messages and stash incoming messages again.

Add test case for message stashing
asfgit pushed a commit that referenced this pull request Aug 16, 2016
…arted

This PR allows the AkkaRpcActor to stash messages until the corresponding RcpEndpoint
has been started. When receiving a Processing.START message, the AkkaRpcActor
unstashes all messages and starts processing rpcs. When receiving a Processing.STOP
message, it will stop processing messages and stash incoming messages again.

Add test case for message stashing

This closes #2358.
@tillrohrmann tillrohrmann deleted the messageStashing branch August 19, 2016 12:22
StephanEwen pushed a commit to StephanEwen/flink that referenced this pull request Aug 25, 2016
…arted

This PR allows the AkkaRpcActor to stash messages until the corresponding RcpEndpoint
has been started. When receiving a Processing.START message, the AkkaRpcActor
unstashes all messages and starts processing rpcs. When receiving a Processing.STOP
message, it will stop processing messages and stash incoming messages again.

Add test case for message stashing

This closes apache#2358.
asfgit pushed a commit that referenced this pull request Sep 8, 2016
…arted

This PR allows the AkkaRpcActor to stash messages until the corresponding RcpEndpoint
has been started. When receiving a Processing.START message, the AkkaRpcActor
unstashes all messages and starts processing rpcs. When receiving a Processing.STOP
message, it will stop processing messages and stash incoming messages again.

Add test case for message stashing

This closes #2358.
tillrohrmann added a commit to tillrohrmann/flink that referenced this pull request Sep 21, 2016
…arted

This PR allows the AkkaRpcActor to stash messages until the corresponding RcpEndpoint
has been started. When receiving a Processing.START message, the AkkaRpcActor
unstashes all messages and starts processing rpcs. When receiving a Processing.STOP
message, it will stop processing messages and stash incoming messages again.

Add test case for message stashing

This closes apache#2358.
tillrohrmann added a commit to tillrohrmann/flink that referenced this pull request Sep 27, 2016
…arted

This PR allows the AkkaRpcActor to stash messages until the corresponding RcpEndpoint
has been started. When receiving a Processing.START message, the AkkaRpcActor
unstashes all messages and starts processing rpcs. When receiving a Processing.STOP
message, it will stop processing messages and stash incoming messages again.

Add test case for message stashing

This closes apache#2358.
asfgit pushed a commit that referenced this pull request Oct 2, 2016
…arted

This PR allows the AkkaRpcActor to stash messages until the corresponding RcpEndpoint
has been started. When receiving a Processing.START message, the AkkaRpcActor
unstashes all messages and starts processing rpcs. When receiving a Processing.STOP
message, it will stop processing messages and stash incoming messages again.

Add test case for message stashing

This closes #2358.
asfgit pushed a commit that referenced this pull request Oct 6, 2016
…arted

This PR allows the AkkaRpcActor to stash messages until the corresponding RcpEndpoint
has been started. When receiving a Processing.START message, the AkkaRpcActor
unstashes all messages and starts processing rpcs. When receiving a Processing.STOP
message, it will stop processing messages and stash incoming messages again.

Add test case for message stashing

This closes #2358.
StephanEwen pushed a commit to StephanEwen/flink that referenced this pull request Oct 14, 2016
…arted

This PR allows the AkkaRpcActor to stash messages until the corresponding RcpEndpoint
has been started. When receiving a Processing.START message, the AkkaRpcActor
unstashes all messages and starts processing rpcs. When receiving a Processing.STOP
message, it will stop processing messages and stash incoming messages again.

Add test case for message stashing

This closes apache#2358.
asfgit pushed a commit that referenced this pull request Oct 21, 2016
…arted

This PR allows the AkkaRpcActor to stash messages until the corresponding RcpEndpoint
has been started. When receiving a Processing.START message, the AkkaRpcActor
unstashes all messages and starts processing rpcs. When receiving a Processing.STOP
message, it will stop processing messages and stash incoming messages again.

Add test case for message stashing

This closes #2358.
tillrohrmann added a commit to tillrohrmann/flink that referenced this pull request Oct 31, 2016
…arted

This PR allows the AkkaRpcActor to stash messages until the corresponding RcpEndpoint
has been started. When receiving a Processing.START message, the AkkaRpcActor
unstashes all messages and starts processing rpcs. When receiving a Processing.STOP
message, it will stop processing messages and stash incoming messages again.

Add test case for message stashing

This closes apache#2358.
tillrohrmann added a commit to tillrohrmann/flink that referenced this pull request Oct 31, 2016
…arted

This PR allows the AkkaRpcActor to stash messages until the corresponding RcpEndpoint
has been started. When receiving a Processing.START message, the AkkaRpcActor
unstashes all messages and starts processing rpcs. When receiving a Processing.STOP
message, it will stop processing messages and stash incoming messages again.

Add test case for message stashing

This closes apache#2358.
asfgit pushed a commit that referenced this pull request Nov 1, 2016
…arted

This PR allows the AkkaRpcActor to stash messages until the corresponding RcpEndpoint
has been started. When receiving a Processing.START message, the AkkaRpcActor
unstashes all messages and starts processing rpcs. When receiving a Processing.STOP
message, it will stop processing messages and stash incoming messages again.

Add test case for message stashing

This closes #2358.
StephanEwen pushed a commit to StephanEwen/flink that referenced this pull request Dec 23, 2016
…arted

This PR allows the AkkaRpcActor to stash messages until the corresponding RcpEndpoint
has been started. When receiving a Processing.START message, the AkkaRpcActor
unstashes all messages and starts processing rpcs. When receiving a Processing.STOP
message, it will stop processing messages and stash incoming messages again.

Add test case for message stashing

This closes apache#2358.
StephanEwen pushed a commit to StephanEwen/flink that referenced this pull request Dec 23, 2016
…arted

This PR allows the AkkaRpcActor to stash messages until the corresponding RcpEndpoint
has been started. When receiving a Processing.START message, the AkkaRpcActor
unstashes all messages and starts processing rpcs. When receiving a Processing.STOP
message, it will stop processing messages and stash incoming messages again.

Add test case for message stashing

This closes apache#2358.
StephanEwen pushed a commit to StephanEwen/flink that referenced this pull request Dec 23, 2016
…arted

This PR allows the AkkaRpcActor to stash messages until the corresponding RcpEndpoint
has been started. When receiving a Processing.START message, the AkkaRpcActor
unstashes all messages and starts processing rpcs. When receiving a Processing.STOP
message, it will stop processing messages and stash incoming messages again.

Add test case for message stashing

This closes apache#2358.
liuyuzhong7 pushed a commit to liuyuzhong7/flink that referenced this pull request Jan 4, 2017
…arted

This PR allows the AkkaRpcActor to stash messages until the corresponding RcpEndpoint
has been started. When receiving a Processing.START message, the AkkaRpcActor
unstashes all messages and starts processing rpcs. When receiving a Processing.STOP
message, it will stop processing messages and stash incoming messages again.

Add test case for message stashing

This closes apache#2358.
liuyuzhong7 pushed a commit to liuyuzhong7/flink that referenced this pull request Jan 17, 2017
…arted

This PR allows the AkkaRpcActor to stash messages until the corresponding RcpEndpoint
has been started. When receiving a Processing.START message, the AkkaRpcActor
unstashes all messages and starts processing rpcs. When receiving a Processing.STOP
message, it will stop processing messages and stash incoming messages again.

Add test case for message stashing

This closes apache#2358.
joseprupi pushed a commit to joseprupi/flink that referenced this pull request Feb 12, 2017
…arted

This PR allows the AkkaRpcActor to stash messages until the corresponding RcpEndpoint
has been started. When receiving a Processing.START message, the AkkaRpcActor
unstashes all messages and starts processing rpcs. When receiving a Processing.STOP
message, it will stop processing messages and stash incoming messages again.

Add test case for message stashing

This closes apache#2358.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants