> On Dec. 19, 2014, 2:05 a.m., Adam B wrote: > > src/common/resources.cpp, line 492 > > <https://reviews.apache.org/r/28698/diff/2/?file=793362#file793362line492> > > > > Is CHECK appropriate here, or should we instead return a Try<Resources>? > > Michael Park wrote: > I think returning a `Try<Resources>` may be better, but I think that > probably breaks frameworks. What's our preferred solution in these situations? > > Adam B wrote: > I doubt anybody's actually using flatten in a framework. But if you want > to do due diligence, you could send a short warning/announcement email to the > dev@ mailing list, and maybe post a small blurb in upgrades.md.
Actually, we validate each `Resource` and only add valid ones to the Resources object. So the `CHECK` is actually appropriate here. But the `Resources::validate` function needs to be updated to check for this condition. - Michael ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/28698/#review65561 ----------------------------------------------------------- On Jan. 28, 2015, 9:21 a.m., Michael Park wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/28698/ > ----------------------------------------------------------- > > (Updated Jan. 28, 2015, 9:21 a.m.) > > > Review request for mesos, Adam B, Benjamin Hindman, Ben Mahler, Jie Yu, and > Vinod Kone. > > > Repository: mesos-git > > > Description > ------- > > Modified Resources to account for reservation type. > > > Diffs > ----- > > include/mesos/resources.hpp 3b57568c10233a0c692787de6464f21af5eaadf4 > src/common/resources.cpp 68f64213c47be4700bcb22cd5b76ba6ff616960d > > Diff: https://reviews.apache.org/r/28698/diff/ > > > Testing > ------- > > make check > > > Thanks, > > Michael Park > >
