Uploaded image for project: 'Mesos'
  1. Mesos
  2. MESOS-6746

IOSwitchboard doesn't properly flush data on ATTACH_CONTAINER_OUTPUT

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.2.0
    • Component/s: None

      Description

      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:

      void IOSwitchboardServerProcess::finalize()                                   
      { 
        foreach (HttpConnection& connection, outputConnections) {                   
          connection.close();                                              
        }                                                                           
        
        if (failure.isSome()) {
          promise.fail(failure->message);                                           
        } else {
          promise.set(Nothing());                                                   
        }                                                                           
      } 
      

      We should change it to:

      void IOSwitchboardServerProcess::finalize()                                   
      { 
        foreach (HttpConnection& connection, outputConnections) {                   
          connection.close();
          connection.closed().await();                                              
        }                                                                           
        
        if (failure.isSome()) {
          promise.fail(failure->message);                                           
        } else {
          promise.set(Nothing());                                                   
        }                                                                           
      } 
      

        Attachments

          Activity

            People

            • Assignee:
              anandmazumdar Anand Mazumdar
              Reporter:
              klueska Kevin Klues
              Shepherd:
              Vinod Kone
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: