> On June 24, 2016, 9:57 p.m., Vinod Kone wrote: > > src/master/weights_handler.cpp, line 216 > > <https://reviews.apache.org/r/48940/diff/2/?file=1428298#file1428298line216> > > > > why this change? looks like we want a sanitized role (#193) to be > > inside validatedWeightInfos. > > zhou xing wrote: > Vinod, at line 242, I added the strings::trim on role, I did this because > in this new method, all the weightInfo/weightInfos are const, so I moved the > trim part to __updateWeights > > haosdent huang wrote: > How about > ``` > foreach (WeightInfo weightInfo, weightInfos) { > ``` > above?
doing a trim in #242 is not enough because you are persisting un-sanitized weight infos in the registry in #235. - Vinod ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/48940/#review139409 ----------------------------------------------------------- On June 23, 2016, 6:04 a.m., zhou xing wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/48940/ > ----------------------------------------------------------- > > (Updated June 23, 2016, 6:04 a.m.) > > > Review request for mesos, Anand Mazumdar, haosdent huang, and Vinod Kone. > > > Bugs: mesos-5496 > https://issues.apache.org/jira/browse/mesos-5496 > > > Repository: mesos > > > Description > ------- > > This patch refined the logic of updating weights in WeightsHandler. > Extracted the public code into new _updateWeights method so that > the new operator API can reuse this method to update weights. > > > Diffs > ----- > > src/master/master.hpp e983d1ba6ebcdaf2ace419201659e53edaa2a0aa > src/master/weights_handler.cpp 51c957f9ad278e60541b2bde3de2b6090a541ec4 > > Diff: https://reviews.apache.org/r/48940/diff/ > > > Testing > ------- > > make > make check > > > Thanks, > > zhou xing > >
