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

process::Connection does not invoke the disconnected callback when remote process exits

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Accepted
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: libprocess
    • Labels:

      Description

      The disconnected callback is never invoked when a local/remote libprocess process terminates. Here is a sample test that shows that the returned future from disconnect() is never fulfilled.

      TEST(HTTPConnectionTest, Disconnected)
      {
        Option<http::Connection> connection;
        Future<Nothing> disconnected;
      
        {
          Http http;
      
          http::URL url = http::URL(
            "http",
            http.process->self().address.ip,
            http.process->self().address.port,
            http.process->self().id + "/get");
      
          Future<http::Connection> connect = http::connect(url);
      
          AWAIT_READY(connect);
      
          connection = connect.get();
      
          disconnected = connection->disconnected();
        }
      
        AWAIT_READY(disconnected);
      }
      

      The Http class refers to the one used in the tests:
      https://github.com/apache/mesos/blob/master/3rdparty/libprocess/src/tests/http_tests.cpp#L114

      The following test passes i.e. when the client explicitly invokes disconnect():

      TEST(HTTPConnectionTest, Disconnected)
      {
        Option<http::Connection> connection;
        Future<Nothing> disconnected;
      
        {
          Http http;
      
          http::URL url = http::URL(
            "http",
            http.process->self().address.ip,
            http.process->self().address.port,
            http.process->self().id + "/get");
      
          Future<http::Connection> connect = http::connect(url);
      
          AWAIT_READY(connect);
      
          connection = connect.get();
      
          disconnected = connection->disconnected();
        }
      
        AWAIT_READY(connection->disconnect());
        AWAIT_READY(disconnected);
      }
      

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              anandmazumdar Anand Mazumdar
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: