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:14 UTC

[mesos] branch 1.8.x updated (8ab96f3 -> db7ce35)

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

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


    from 8ab96f3  Updated Mesos version to 1.8.1.
     new f681629  Fixed an issue where /__processes__ never returns a response.
     new db7ce35  Added MESOS-9766 to the 1.8.1 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] 02/02: Added MESOS-9766 to the 1.8.1 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.8.x
in repository https://gitbox.apache.org/repos/asf/mesos.git

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

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

diff --git a/CHANGELOG b/CHANGELOG
index ed2862c..2abd945 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -6,6 +6,7 @@ Release Notes - Mesos - Version 1.8.1 (WIP)
   * [MESOS-9536] - Nested container launched with non-root user may not be able to write to its sandbox via the environment variable `MESOS_SANDBOX`.
   * [MESOS-9616] - `Filters.refuse_seconds` declines resources not in offers.
   * [MESOS-9695] - Remove the duplicate pid check in Docker containerizer
+  * [MESOS-9766] - /__processes__ endpoint can hang.
 
 Release Notes - Mesos - Version 1.8.0
 -------------------------------------


[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.8.x
in repository https://gitbox.apache.org/repos/asf/mesos.git

commit f681629e17baaae3228a39e17c3326b2e8b1caf4
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 1248364..a47b570 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);
+          }
         }
         return OK(array);
       });