You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by bm...@apache.org on 2019/05/06 22:35:08 UTC

[mesos] branch 1.7.x updated (b82ad53 -> 658e793)

This is an automated email from the ASF dual-hosted git repository.

bmahler pushed a change to branch 1.7.x
in repository https://gitbox.apache.org/repos/asf/mesos.git.


    from b82ad53  Added MESOS-9616 to the 1.7.3 CHANGELOG.
     new 9c79d51  Fixed an issue where /__processes__ never returns a response.
     new 658e793  Added MESOS-9766 to the 1.7.3 CHANGELOG.

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 3rdparty/libprocess/src/process.cpp | 20 ++++++++++++++------
 CHANGELOG                           |  1 +
 2 files changed, 15 insertions(+), 6 deletions(-)


[mesos] 01/02: Fixed an issue where /__processes__ never returns a response.

Posted by bm...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

bmahler pushed a commit to branch 1.7.x
in repository https://gitbox.apache.org/repos/asf/mesos.git

commit 9c79d51c4fc0dbdee5d1a275f81493f998816ab6
Author: Benjamin Mahler <bm...@apache.org>
AuthorDate: Fri May 3 15:51:31 2019 -0400

    Fixed an issue where /__processes__ never returns a response.
    
    It's possible for /__processes__ to never return a response if
    a process is terminated after the /__processes__ handler dispatches
    to it, thus leading the Future to be abandoned.
    
    This patch ensures we ignore those cases, rather than wait forever.
    
    See MESOS-9766.
    
    Review: https://reviews.apache.org/r/70594
---
 3rdparty/libprocess/src/process.cpp | 20 ++++++++++++++------
 1 file changed, 14 insertions(+), 6 deletions(-)

diff --git a/3rdparty/libprocess/src/process.cpp b/3rdparty/libprocess/src/process.cpp
index 81c1876..e1f2f18 100644
--- a/3rdparty/libprocess/src/process.cpp
+++ b/3rdparty/libprocess/src/process.cpp
@@ -3396,15 +3396,23 @@ Future<Response> ProcessManager::__processes__(const Request&)
           // high-priority set of events (i.e., mailbox).
           return dispatch(
               process->self(),
-              [process]() -> JSON::Object {
-                return *process;
-              });
+              [process]() -> Option<JSON::Object> {
+                return Option<JSON::Object>(*process);
+              })
+            // We must recover abandoned futures in case
+            // the process is terminated and the dispatch
+            // is dropped.
+            .recover([](const Future<Option<JSON::Object>>& f) {
+              return Option<JSON::Object>::none();
+            });
         },
         process_manager->processes.values()))
-      .then([](const std::vector<JSON::Object>& objects) -> Response {
+      .then([](const std::vector<Option<JSON::Object>>& objects) -> Response {
         JSON::Array array;
-        foreach (const JSON::Object& object, objects) {
-          array.values.push_back(object);
+        foreach (const Option<JSON::Object>& object, objects) {
+          if (object.isSome()) {
+            array.values.push_back(object.get());
+          }
         }
         return OK(array);
       });


[mesos] 02/02: Added MESOS-9766 to the 1.7.3 CHANGELOG.

Posted by bm...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

bmahler pushed a commit to branch 1.7.x
in repository https://gitbox.apache.org/repos/asf/mesos.git

commit 658e793c2bec7a6862875e78b0ae9f8afdef8248
Author: Benjamin Mahler <bm...@apache.org>
AuthorDate: Mon May 6 18:13:17 2019 -0400

    Added MESOS-9766 to the 1.7.3 CHANGELOG.
---
 CHANGELOG | 1 +
 1 file changed, 1 insertion(+)

diff --git a/CHANGELOG b/CHANGELOG
index 5767b1f..0b3cf75 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -18,6 +18,7 @@ Release Notes - Mesos - Version 1.7.3 (WIP)
   * [MESOS-9692] - Quota may be under allocated for disk resources.
   * [MESOS-9695] - Remove the duplicate pid check in Docker containerizer
   * [MESOS-9707] - Calling link::lo() may cause runtime error
+  * [MESOS-9766] - /__processes__ endpoint can hang.
 
 ** Improvements
   * [MESOS-8880] - Add minimum capabilities in the master.