> On Nov. 7, 2017, 8:45 p.m., Jie Yu wrote: > > src/slave/slave.cpp > > Lines 6823-6825 (patched) > > <https://reviews.apache.org/r/63622/diff/1/?file=1883861#file1883861line6823> > > > > We still want to forward the status udpate for those operations, right? > > Just we don't need to adjust the `totalResources` of the agent. > > > > I think a better flow here is: > > ``` > > vector<ResourceConversion> conversions; > > > > // Calculate conversions based on the status update. > > // This only applies to new operations and latest > > // status is terminal. For other cases, conversions > > // will be empty. > > > > totalResources.apply(conversions); > > > > // Forward status update. > > ```
This will be part of a later patch that will add support for handling these operations with resource providers. As of this patch, resource providers can only handle `CREATE_VOLUME`, `DESTROY_VOLUME`, `CREATE_BLOCK`, `DESTROY_BLOCK` operation, so IMO we don't need to forward it just yet. - Jan ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/63622/#review190355 ----------------------------------------------------------- On Nov. 7, 2017, 3:20 p.m., Jan Schlicht wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/63622/ > ----------------------------------------------------------- > > (Updated Nov. 7, 2017, 3:20 p.m.) > > > Review request for mesos, Benjamin Bannier and Jie Yu. > > > Repository: mesos > > > Description > ------- > > When a resource provider has finished an offer operation, it will send > a status update to the resource provider manager and subsequently to an > agent. The agent then updates its internal bookkeeping and forwards the > status update to the master. > > > Diffs > ----- > > src/resource_provider/manager.cpp a878507d71a09a415d8a4573cf2b33c26c985451 > src/resource_provider/message.hpp 3c7c3f2baeb726e04edd6ffbb9784699d7afe521 > src/slave/slave.hpp df1b0205124555dcb6a0efa5c237f5e77fa2bdf7 > src/slave/slave.cpp c10823985154bac19f8952b94311a03b2b9b4ea1 > src/tests/resource_provider_manager_tests.cpp > 4008b1c751d6227b99adef756e95174d7d8a62f2 > > > Diff: https://reviews.apache.org/r/63622/diff/1/ > > > Testing > ------- > > make check > > > Thanks, > > Jan Schlicht > >
