mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benjamin Mahler <bmah...@apache.org>
Subject Re: Review Request 54223: Adjusted agent `usedResources` accounting at the master.
Date Wed, 30 Nov 2016 21:32:08 GMT

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


Ship it!




Ship It!

- Benjamin Mahler


On Nov. 30, 2016, 7:21 p.m., Neil Conway wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/54223/
> -----------------------------------------------------------
> 
> (Updated Nov. 30, 2016, 7:21 p.m.)
> 
> 
> Review request for mesos and Benjamin Mahler.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> If an agent finished running all the tasks for a given framework, the
> previous coding resulted in leaving an empty `Resources` object in the
> Slave's `usedResources` hashmap.
> 
> Along the way, replace using `[]` to access a hashmap in a `CHECK` with
> `at`. Because `[]` can modify the map, we should generally prefer using
> `at` for accesses that are intended to be read-only.
> 
> 
> Diffs
> -----
> 
>   src/master/master.hpp b6c610b79aab146ece6b9be59be86f283d1c9ee8 
> 
> Diff: https://reviews.apache.org/r/54223/diff/
> 
> 
> Testing
> -------
> 
> `make check`
> 
> By adding `LOG(INFO)` to `Master::finalize()`, I validated that when running a test like
`MasterTest.KillTask`, the previous implementation left a key with an empty `Resources` object
in the `usedResources` hashmap. After this change, the `hashmap` is empty, as expected.
> 
> 
> Thanks,
> 
> Neil Conway
> 
>


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