[ 
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)

Reply via email to