GitHub user zsxwing opened a pull request:

    https://github.com/apache/spark/pull/9197

    [SPARK-11098][Core]Add Outbox to cache the sending messages to resolve the 
message disorder issue

    The current NettyRpc has a message order issue because it uses a thread 
pool to send messages. E.g., running the following two lines in the same thread,
    
    ```
    ref.send("A")
    ref.send("B")
    ```
    
    The remote endpoint may see "B" before "A" because sending "A" and "B" are 
in parallel.
    To resolve this issue, this PR added an outbox for each connection, and if 
we are connecting to the remote node when sending messages, just cache the 
sending messages in the outbox and send them one by one when the connection is 
established.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/zsxwing/spark rpc-outbox

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/9197.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #9197
    
----
commit 295f92a84d447ed8f0c8e5cbb38379f9f76f0888
Author: zsxwing <[email protected]>
Date:   2015-10-20T08:18:11Z

    Add Outbox to cache the sending messages to resolve the message disorder 
issue

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to