----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/60283/#review178536 -----------------------------------------------------------
src/master/master.cpp Lines 4234 (patched) <https://reviews.apache.org/r/60283/#comment252584> Per offline discussion, naming this `upgradeResources_` vs validation errors as `error` is confusing. Call them both `error` and change the upgrade API? src/master/master.cpp Line 4302 (original), 4316 (patched) <https://reviews.apache.org/r/60283/#comment252577> Can we revert this formatting change? src/master/master.cpp Line 4592 (original), 4647 (patched) <https://reviews.apache.org/r/60283/#comment252585> Not yours, but using a reference here is strange. src/master/master.cpp Lines 4784 (patched) <https://reviews.apache.org/r/60283/#comment252587> If we can use `Option<Error>` for `upgradeResources`, can we avoid duplicating all this error handling code? - Neil Conway On June 21, 2017, 7:08 p.m., Michael Park wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/60283/ > ----------------------------------------------------------- > > (Updated June 21, 2017, 7:08 p.m.) > > > Review request for mesos and Neil Conway. > > > Repository: mesos > > > Description > ------- > > Initially, it seemed like calling `convertResourceFormat` after > operation validation seemed safe since the operation validation > themselves performed `Resources::validate` within them. > > However, the rest of the operation validation code relies on > the fact that the resources have been validated, and uses > functions such as `isDynamicallyReserved`. Since functions such as > `isDynamicallyReserved` now requires "post-reservation-refinement" > format, we must perform this conversion earlier. > > In this patch, we use `upgradeResources` to perform resources > validation __and__ convert the resources before going into the > operation and task validation. > > We really need a better plan for this going forward. MESOS-7702. > > > Diffs > ----- > > src/master/master.cpp ec594a8f4fa95e77fc38103c5561d1797fe2b133 > > > Diff: https://reviews.apache.org/r/60283/diff/1/ > > > Testing > ------- > > > Thanks, > > Michael Park > >
