----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/66546/#review201773 -----------------------------------------------------------
Please update the commit summary accordingly if you move the check in `subscribe()` to the previous patch. src/resource_provider/manager.cpp Lines 683-692 (patched) <https://reviews.apache.org/r/66546/#comment283367> Let's move this to r/66545. src/tests/resource_provider_manager_tests.cpp Lines 1160 (patched) <https://reviews.apache.org/r/66546/#comment283371> No need to create the master flag first since it is not used elsewhere. It also seems that we have this redundant step in all other tests. src/tests/resource_provider_manager_tests.cpp Lines 1197-1198 (patched) <https://reviews.apache.org/r/66546/#comment283379> The `disconnected` callback is run in another actor (the `Driver`) so let's swap the order of the two actions to make sure that `Invoke` is executed before the `resourceProvider` pointer itself is destructed at the end of its scope. - Chun-Hung Hsiao On April 12, 2018, 9:48 a.m., Benjamin Bannier wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/66546/ > ----------------------------------------------------------- > > (Updated April 12, 2018, 9:48 a.m.) > > > Review request for mesos, Chun-Hung Hsiao and Jan Schlicht. > > > Bugs: MESOS-7558 > https://issues.apache.org/jira/browse/MESOS-7558 > > > Repository: mesos > > > Description > ------- > > This patch adds a check to the resource provider manager's subscribe > functionality making sure that any the ID sent by a resubscribing > resource provider corresponds to some previously known resource > provider. > > This not only serves as convenient validation of user-provided data, > but also makes sure that the internal state of the resource provider > manager remains consistent. > > > Diffs > ----- > > src/resource_provider/manager.cpp 68e1866986bfb91bf8355099ee1f0a2a86aba39a > src/tests/resource_provider_manager_tests.cpp > c52541bf130ccf4795b989b53331176a64a097ea > > > Diff: https://reviews.apache.org/r/66546/diff/5/ > > > Testing > ------- > > `make check` > > > Thanks, > > Benjamin Bannier > >
