You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by al...@apache.org on 2017/03/23 23:18:03 UTC

[07/10] mesos git commit: Added a warning if default executor gets an unknown acknowledgement.

Added a warning if default executor gets an unknown acknowledgement.

Review: https://reviews.apache.org/r/57694/


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/8093c866
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/8093c866
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/8093c866

Branch: refs/heads/master
Commit: 8093c866db0805e6c25d5b3c15c1cb6fa2bf91f8
Parents: 0d9d328
Author: Alexander Rukletsov <ru...@gmail.com>
Authored: Thu Mar 23 17:11:12 2017 +0100
Committer: Alexander Rukletsov <al...@apache.org>
Committed: Fri Mar 24 00:17:27 2017 +0100

----------------------------------------------------------------------
 src/launcher/default_executor.cpp | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/8093c866/src/launcher/default_executor.cpp
----------------------------------------------------------------------
diff --git a/src/launcher/default_executor.cpp b/src/launcher/default_executor.cpp
index 9f98786..5d99def 100644
--- a/src/launcher/default_executor.cpp
+++ b/src/launcher/default_executor.cpp
@@ -196,9 +196,16 @@ public:
       }
 
       case Event::ACKNOWLEDGED: {
+        const UUID uuid = UUID::fromBytes(event.acknowledged().uuid()).get();
+
+        if (!unacknowledgedUpdates.contains(uuid)) {
+          LOG(WARNING) << "Received acknowledgement " << uuid
+                       << " for unknown status update";
+          return;
+        }
+
         // Remove the corresponding update.
-        unacknowledgedUpdates.erase(
-            UUID::fromBytes(event.acknowledged().uuid()).get());
+        unacknowledgedUpdates.erase(uuid);
 
         // Remove the corresponding task.
         unacknowledgedTasks.erase(event.acknowledged().task_id());