mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jiang Yan Xu <...@jxu.me>
Subject Re: Review Request 58487: Fix allocation quantities when shared resources are removed.
Date Thu, 20 Apr 2017 18:19:05 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/58487/#review172418
-----------------------------------------------------------



Do we need this?

The method

```
virtual void update(
      const std::string& name,
      const SlaveID& slaveId,
      const Resources& oldAllocation,
      const Resources& newAllocation);
```

is not supposed to change the quantities (and we have another patch for adding a CHECK). We
ought to be able to just assert that `oldAllocation` and `newAllocation` have the same quantity
and then do not modify `allocations[name].scalarQuantities` or `allocations[name].totals[resource.name()]`
at all. This is basically what the other does?

- Jiang Yan Xu


On April 18, 2017, 7:50 p.m., Anindya Sinha wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/58487/
> -----------------------------------------------------------
> 
> (Updated April 18, 2017, 7:50 p.m.)
> 
> 
> Review request for mesos, James Peach and Jiang Yan Xu.
> 
> 
> Bugs: MESOS-7308
>     https://issues.apache.org/jira/browse/MESOS-7308
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> When shared resources are removed from the `allocations` in the sorter,
> we remove the scalar quantity only when the shared resource is actually
> removed (i.e. shared count goes down to 0). Similarly, we increase the
> scalar quantity only when this is a new shared resource that is being
> added to the `allocations`.
> 
> 
> Diffs
> -----
> 
>   src/master/allocator/sorter/drf/sorter.cpp ed54680cecb637931fc344fbcf8fd3b14cc24295

> 
> 
> Diff: https://reviews.apache.org/r/58487/diff/2/
> 
> 
> Testing
> -------
> 
> Tests passed.
> 
> 
> Thanks,
> 
> Anindya Sinha
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message