----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/32398/#review79445 -----------------------------------------------------------
Ship it! Nice tests! src/common/resources.cpp <https://reviews.apache.org/r/32398/#comment128831> Since we already have `isReserved`. How about calling it `isDynamicallyReserved`? src/common/resources_utils.cpp <https://reviews.apache.org/r/32398/#comment128838> So bad that we are effectively duplicating the logics in Resources::apply here. But I couldn't come up with a better way without introducing stripping. Maybe add a command about what we are doing here. We are effectively infering offer operations from checkpointed resources and apply them to the totalResources. src/tests/reservation_tests.cpp <https://reviews.apache.org/r/32398/#comment128840> I think for initialization list, I considently remove leading and tailing spaces around { and }: ``` {offer.id()}, {RESERVE(...), ..., UNRESERVE(..)} ``` src/tests/reservation_tests.cpp <https://reviews.apache.org/r/32398/#comment128841> Do you want to say something about persitent volumes in the comment?:) src/tests/reservation_tests.cpp <https://reviews.apache.org/r/32398/#comment128842> compatible or not compatible? - Jie Yu On April 8, 2015, 6:38 p.m., Michael Park wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/32398/ > ----------------------------------------------------------- > > (Updated April 8, 2015, 6:38 p.m.) > > > Review request for mesos and Alexander Rukletsov. > > > Bugs: MESOS-2491 > https://issues.apache.org/jira/browse/MESOS-2491 > > > Repository: mesos > > > Description > ------- > > * Added `isDynamicReservation(resource)` which returns true if the resource > is either a dynamic role reservation or a framework reservation. > * Added the `isDynamicReservation` condition onto `needCheckpointing`. > * Updated the `applyCheckpointedResources` to consider dynamic reservations. > * Added tests. > > > Diffs > ----- > > include/mesos/resources.hpp 56affd45e1e71e96ff5778b43271f81b9b9a9e4d > src/common/resources.cpp 2c99b6884d7296099e19e2e3182cbe11b5e1e059 > src/common/resources_utils.cpp fe04d57227fa193d6d11d2f76529c46aea74c6a1 > src/tests/reservation_tests.cpp PRE-CREATION > > Diff: https://reviews.apache.org/r/32398/diff/ > > > Testing > ------- > > make check > > > Thanks, > > Michael Park > >