You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mesos.apache.org by xujyan <gi...@git.apache.org> on 2018/04/05 18:11:27 UTC
[GitHub] mesos pull request #279: WIP: Remove unknown unreachable tasks when agent re...
Github user xujyan commented on a diff in the pull request:
https://github.com/apache/mesos/pull/279#discussion_r179539166
--- Diff: src/master/master.hpp ---
@@ -1913,6 +1913,10 @@ class Master : public ProtobufProcess<Master>
// `registry_max_agent_age`, and `registry_max_agent_count` flags.
LinkedHashMap<SlaveID, TimeInfo> unreachable;
+
+ // Holds the `FrameworkID` and set of `TaskID` for the agents marked unreachable.
+ hashmap<SlaveID, hashmap<FrameworkID, hashset<TaskID>>> unreachableAgentsToTasks;
--- End diff --
I would suggest s/unreachableAgentsToTasks/unreachableTasks/. It's under the `slaves` struct already so the longer name would be a bit redundant. However we probably need a long comment explaining why we need to do this, in particular:
- This helps us look up all unreachable tasks on an agent so we can remove them from their primary storage`framework.unreacahbleTasks` when an agent reregisters.
- This map is bounded by the same GC behavior as `unreachable`. i.e., the agent is GC'd from `unreachable` it's also erased from `unreachableTasks`.
Can we use an multihashmap (in stout)?
---