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

chhsiao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mesos.git

commit 911a618064326dfbdfde5c7113b771ccf07d1a4a
Author: Benjamin Bannier <benjamin.bann...@mesosphere.io>
AuthorDate: Thu Aug 16 17:05:23 2018 -0700

    Properly defer'ed calls to SLRP's `fatal` method.
    
    `StorageLocalResourceProviderProcess::fatal` causes termination of the
    process' driver process via destruction of the driver process'
    wrapper. The wrapper correctly makes sure to `wait` for the process to
    finish. Due to the `wait` we must never call `fatal` on the driver
    process actor itself as otherwise the `wait` would deadlock.
    
    This patch adds missing `defer`s so `fatal` is executed on the SLRP
    actor instead of an arbitrary actor, like e.g., the driver process
    actor.
    
    Review: https://reviews.apache.org/r/68361/
---
 src/resource_provider/storage/provider.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/resource_provider/storage/provider.cpp 
b/src/resource_provider/storage/provider.cpp
index 22c184f..fc48072 100644
--- a/src/resource_provider/storage/provider.cpp
+++ b/src/resource_provider/storage/provider.cpp
@@ -3471,8 +3471,8 @@ void 
StorageLocalResourceProviderProcess::sendResourceProviderStateUpdate()
   };
 
   driver->send(evolve(call))
-    .onFailed(std::bind(die, info.id(), lambda::_1))
-    .onDiscarded(std::bind(die, info.id(), "future discarded"));
+    .onFailed(defer(self(), std::bind(die, info.id(), lambda::_1)))
+    .onDiscarded(defer(self(), std::bind(die, info.id(), "future discarded")));
 }
 
 

Reply via email to