> On Nov. 16, 2014, 1:10 a.m., Michael Park wrote: > > src/common/resources.cpp, line 387 > > <https://reviews.apache.org/r/28091/diff/2/?file=765012#file765012line387> > > > > In this case, it doesn't __need__ to be. But `Resources` has a member > > variable named `resources` which would be shadowed if this local variable > > had the same name. We should stay away from shadowing names as it's very > > error-prone and can be difficult to debug.
Fixed > On Nov. 16, 2014, 1:10 a.m., Michael Park wrote: > > src/common/resources.cpp, line 738 > > <https://reviews.apache.org/r/28091/diff/2/?file=765012#file765012line738> > > > > We should keep the `size` check as long as it's still valid since it's > > a trivial check that allows us to exit early. I prefer not because what does 'size()' mean to Resources object? It's not clear. So I would rather not to introduce this interface. - Jie ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/28091/#review61673 ----------------------------------------------------------- On Nov. 15, 2014, 7:18 a.m., Jie Yu wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/28091/ > ----------------------------------------------------------- > > (Updated Nov. 15, 2014, 7:18 a.m.) > > > Review request for mesos, Ben Mahler and Vinod Kone. > > > Bugs: MESOS-1974 > https://issues.apache.org/jira/browse/MESOS-1974 > > > Repository: mesos-git > > > Description > ------- > > See summary. Always combine Resource objects in Resources and disallow > invalid/zero Resource objects. > > > Diffs > ----- > > include/mesos/resources.hpp 0e37170 > src/common/resources.cpp e9a0c85 > src/examples/low_level_scheduler_libprocess.cpp 89b4318 > src/examples/low_level_scheduler_pthread.cpp e5cd48a > src/examples/test_framework.cpp e87198b > src/master/drf_sorter.cpp 5464900 > src/master/hierarchical_allocator_process.hpp 31dfb2c > src/master/http.cpp 3189933 > src/master/master.cpp 83c2f8a > src/slave/containerizer/containerizer.cpp f234835 > src/tests/gc_tests.cpp 8618ae1 > src/tests/mesos.hpp c1d64a7 > src/tests/resource_offers_tests.cpp 43820b0 > src/tests/resources_tests.cpp 3e50889 > > Diff: https://reviews.apache.org/r/28091/diff/ > > > Testing > ------- > > make check > > > Thanks, > > Jie Yu > >
