You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by vi...@apache.org on 2014/06/11 01:33:49 UTC
[4/7] git commit: Fixed a bug in scheduler driver to properly erase
'savedOffers'.
Fixed a bug in scheduler driver to properly erase 'savedOffers'.
Review: https://reviews.apache.org/r/22148
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/dd94a1fe
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/dd94a1fe
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/dd94a1fe
Branch: refs/heads/vinod/authorize_tasks
Commit: dd94a1fe9aff281f49d61bd8c214f41fcb340b04
Parents: 23a25e7
Author: Vinod Kone <vi...@twitter.com>
Authored: Thu May 29 15:32:03 2014 -0700
Committer: Vinod Kone <vi...@twitter.com>
Committed: Tue Jun 10 16:33:36 2014 -0700
----------------------------------------------------------------------
src/sched/sched.cpp | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/dd94a1fe/src/sched/sched.cpp
----------------------------------------------------------------------
diff --git a/src/sched/sched.cpp b/src/sched/sched.cpp
index 9459c9c..6e14f1c 100644
--- a/src/sched/sched.cpp
+++ b/src/sched/sched.cpp
@@ -890,7 +890,7 @@ protected:
foreach (const TaskInfo& task, result) {
// Keep only the slave PIDs where we run tasks so we can send
// framework messages directly.
- if (savedOffers.count(offerId) > 0) {
+ if (savedOffers.contains(offerId)) {
if (savedOffers[offerId].count(task.slave_id()) > 0) {
savedSlavePids[task.slave_id()] =
savedOffers[offerId][task.slave_id()];
@@ -902,10 +902,9 @@ protected:
LOG(WARNING) << "Attempting to launch task " << task.task_id()
<< " with an unknown offer " << offerId;
}
-
- // Remove the offer since we saved all the PIDs we might use.
- savedOffers.erase(offerId);
}
+ // Remove the offer since we saved all the PIDs we might use.
+ savedOffers.erase(offerId);
}
foreach (const TaskInfo& task, result) {