mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Neil Conway <neil.con...@gmail.com>
Subject Review Request 54223: Adjusted agent `usedResources` accounting at the master.
Date Wed, 30 Nov 2016 19:21:12 GMT

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

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