You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@mesos.apache.org by "Anand Mazumdar (JIRA)" <ji...@apache.org> on 2016/12/07 21:44:58 UTC

[jira] [Updated] (MESOS-6746) IOSwitchboard doesn't properly flush data on ATTACH_CONTAINER_OUTPUT

     [ https://issues.apache.org/jira/browse/MESOS-6746?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Anand Mazumdar updated MESOS-6746:
----------------------------------
    Shepherd: Vinod Kone
      Sprint: Mesosphere Sprint 47

> IOSwitchboard doesn't properly flush data on ATTACH_CONTAINER_OUTPUT
> --------------------------------------------------------------------
>
>                 Key: MESOS-6746
>                 URL: https://issues.apache.org/jira/browse/MESOS-6746
>             Project: Mesos
>          Issue Type: Bug
>            Reporter: Kevin Klues
>            Assignee: Anand Mazumdar
>              Labels: debugging, mesosphere
>             Fix For: 1.2.0
>
>
> Currently we are doing a close on the write end of all connection pipes when we exit the switchboard, but we don't wait until the read is flushed before exiting. This can cause some data to get dropped since the process may exit before the reader is flushed.  The current code is:
> {noformat}
> void IOSwitchboardServerProcess::finalize()                                   
> { 
>   foreach (HttpConnection& connection, outputConnections) {                   
>     connection.close();                                              
>   }                                                                           
>   
>   if (failure.isSome()) {
>     promise.fail(failure->message);                                           
>   } else {
>     promise.set(Nothing());                                                   
>   }                                                                           
> } 
> {noformat}
> We should change it to:
> {noformat}
> void IOSwitchboardServerProcess::finalize()                                   
> { 
>   foreach (HttpConnection& connection, outputConnections) {                   
>     connection.close();
>     connection.closed().await();                                              
>   }                                                                           
>   
>   if (failure.isSome()) {
>     promise.fail(failure->message);                                           
>   } else {
>     promise.set(Nothing());                                                   
>   }                                                                           
> } 
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)