> On July 28, 2017, 11:42 p.m., Jie Yu wrote: > > src/resource_provider/manager.cpp > > Lines 270-274 (patched) > > <https://reviews.apache.org/r/61181/diff/1/?file=1784494#file1784494line270> > > > > That makes me think if it's easier to always rely on `Update` to report > > the total resources of a resource provider. `Subscribe` will just register > > with the manager with `ResourceProviderInfo`. The resource provider will > > send an update to the manager after subscription is successful? > > > > In that way, we don't have to worry about the ID injection in the > > manager any more (we do need to do validation!)
Yes, I believe that would make sense. I would however suggest to not tackle this right now, and instead defer this to the time where we have an update call available as this protocol requires e.g., slightly more advanced testing tools as one would need to maintain a connection (e.g., a proper `MockResourceProvider` to maintain connections). The change should be non-intrusive as we'd be in control of manager as well as resource providers at that point. I added a `TODO` to https://reviews.apache.org/r/61180/ for now. - Benjamin ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/61181/#review181733 ----------------------------------------------------------- On July 31, 2017, 5:08 p.m., Benjamin Bannier wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/61181/ > ----------------------------------------------------------- > > (Updated July 31, 2017, 5:08 p.m.) > > > Review request for mesos, Jie Yu and Jan Schlicht. > > > Bugs: MESOS-7837 > https://issues.apache.org/jira/browse/MESOS-7837 > > > Repository: mesos > > > Description > ------- > > In order to be able to always communicate the aggregated total > resources available on all subscribed resource providers, a resource > provider manager needs to keep track of the resources of all > subscribed resource providers. This commit adds a field for that the > manager's internal data structures for that purpose. > > To make assigned 'ResourceProviderID's opaque to users of managers, the > manager assigns provider ids to all resources added. > > > Diffs > ----- > > src/resource_provider/manager.cpp 44e1576d4462295d404429d51682134306047462 > > > Diff: https://reviews.apache.org/r/61181/diff/2/ > > > Testing > ------- > > Tested as part of https://reviews.apache.org/r/61182/. > > > Thanks, > > Benjamin Bannier > >
