> On March 12, 2015, 5:40 p.m., Ian Downes wrote: > > src/slave/containerizer/isolators/cgroups/mem.cpp, line 444 > > <https://reviews.apache.org/r/30546/diff/3/?file=891716#file891716line444> > > > > If any listener fails then all of usage() always fails? But, if all > > three listeners eventually fail then you change to returning early and > > reporting the partially completed statistics? > > > > This is odd and inconsistent behavior, suggest rethinking this.
Nah, that failure is a placeholder for the listener that has failed in the past. _usage always returns all the results it has. The new version keeps the same behaviour. > On March 12, 2015, 5:40 p.m., Ian Downes wrote: > > src/slave/containerizer/isolators/cgroups/mem.cpp, line 443 > > <https://reviews.apache.org/r/30546/diff/2-3/?file=881464#file881464line443> > > > > Can you chain these together rather than using await? See below for > > suggested changes to _usage() to facilitate this. > > > > You would pass the hash key to usage() along with the counter value you > > get, this decouples the chaining from the presence of listeners. This also > > means you can avoid have the Option<> for the hash value - you'd just > > remove them if they failed. yeah, that simplied a lot. thanks! - Chi ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/30546/#review76245 ----------------------------------------------------------- On March 18, 2015, 6:32 p.m., Chi Zhang wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/30546/ > ----------------------------------------------------------- > > (Updated March 18, 2015, 6:32 p.m.) > > > Review request for mesos, Dominic Hamon, Ian Downes, and Jie Yu. > > > Bugs: MESOS-2136 > https://issues.apache.org/jira/browse/MESOS-2136 > > > Repository: mesos > > > Description > ------- > > MemIsolator: expose memory pressures for containers. > > > Diffs > ----- > > include/mesos/mesos.proto ec8efaec13f54a56d82411f6cdbdb8ad8b103748 > src/slave/containerizer/isolators/cgroups/mem.hpp > a00f723de61b9bccd76a2948b6d14fde7a993a8d > src/slave/containerizer/isolators/cgroups/mem.cpp > 6299ca4ba01b65daa3d75c64150e2738e32b841e > src/tests/slave_recovery_tests.cpp 53adae0118a26e6d25a9ff20c6374cc8e73275b1 > > Diff: https://reviews.apache.org/r/30546/diff/ > > > Testing > ------- > > > Thanks, > > Chi Zhang > >