> On Dec. 7, 2017, 8:15 p.m., Jie Yu wrote: > > src/master/master.cpp > > Lines 7204-7207 (original), 7223-7226 (patched) > > <https://reviews.apache.org/r/64423/diff/1/?file=1910532#file1910532line7226> > > > > This probably need some adjustment given that message.offer_operations > > will be for agent default resources and `slave->offerOperations` will be > > for all RPs?
This is only a first heuristic. If `!updated` we perform a more exhaustive check below taking offer operations both from the agent and the resource providers into account. Most of this code is to avoid unneeded work, and I do agree that it currently is not very readible; we should clean it up once we explicitly store all interesting resource provider information in the master and we wouldn't need to synthetize resource provider information here anymore to perform simple checks. - Benjamin ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/64423/#review193150 ----------------------------------------------------------- On Dec. 8, 2017, 1:17 a.m., Benjamin Bannier wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/64423/ > ----------------------------------------------------------- > > (Updated Dec. 8, 2017, 1:17 a.m.) > > > Review request for mesos, Jie Yu and Jan Schlicht. > > > Bugs: MESOS-8312 > https://issues.apache.org/jira/browse/MESOS-8312 > > > Repository: mesos > > > Description > ------- > > This patch changes the way resource-provider related information is > passed. Instead of aggregating all information from both the agent and > resource providers into global per-agent lists in > `UpdateSlaveMessage`, with this patch we pass resource-provider > related information explicitly. We can in a subsequent patch surface > this information in e.g., the operator API. > > > Diffs > ----- > > src/master/master.hpp 2658312b0d10a72fefda68c7d3137b94afbd8249 > src/master/master.cpp 1d192db8edd36dac99ebecd17edd9a4df53a416e > src/slave/slave.hpp bbf5b79528eda42465b62e49d4cea3bda3931241 > src/slave/slave.cpp fb077b7a979ebf6b406cd711642dd05f8749f2d0 > src/tests/slave_tests.cpp 25cfd4730c3d77d1886745204b13ca3cb140620c > > > Diff: https://reviews.apache.org/r/64423/diff/2/ > > > Testing > ------- > > `make check` > > > Thanks, > > Benjamin Bannier > >
