[
https://issues.apache.org/jira/browse/MESOS-8389?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Benjamin Mahler reassigned MESOS-8389:
--------------------------------------
Assignee: Benjamin Mahler
> Notion of "removable" task in master code is inaccurate.
> --------------------------------------------------------
>
> Key: MESOS-8389
> URL: https://issues.apache.org/jira/browse/MESOS-8389
> Project: Mesos
> Issue Type: Improvement
> Components: master
> Reporter: Benjamin Mahler
> Assignee: Benjamin Mahler
> Priority: Major
>
> In the past, the notion of a "removable" task meant: the task is terminal and
> acknowledged. It appears now that a removable task is defined purely by its
> state (terminal or unreachable) but not whether the terminal update is
> acknowledged.
> As a result, the code that is calling this function ({{isRemovable}}) ends up
> being unintuitive. One example of a confusing piece of code is within
> {{updateTask}}. Here, we have logic which says, if the task is removable,
> recover the resources *but don't remove it*. This seems more intuitive if
> directly described as: "if the task is no longer consuming resources, then
> (e.g. transitioned to terminal or unreachable) then recover the resources".
> If one looks up the documentation of {{isRemovable}}, it says "When a task
> becomes removable, it is erased from the master's primary task data
> structures", but that isn't accurate since this function doesn't say whether
> the terminal task has been acknowledged, which is required for a task to be
> removable.
> I think an easy improvement here would be to move this notion of removable
> towards something like {{isTerminalOrUnreachable}}. We could also think about
> how to name this concept more generally, like {{canReleaseResources}} to
> describe whether the task's resources are considered allocated.
> If we do introduce a notion of {{isRemovable}}, it seems it should be saying
> whether the task could be removed from the master, which includes checking
> that terminal tasks have been acknowledged.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)