----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/63731/#review191108 -----------------------------------------------------------
src/slave/slave.cpp Line 6722 (original), 6722 (patched) <https://reviews.apache.org/r/63731/#comment268697> I suggest we change this to `UPDATE_STATE` to align with the RP API because we also update operations (not just total resources). src/slave/slave.cpp Lines 6745 (patched) <https://reviews.apache.org/r/63731/#comment268732> I would add a big comment here explaining in what scenarios, there might be operations that are known by the slave, but not known by the RP. For instance, RP got disconnected and the offer operation is dropped due to that. Is there any other cases that this will happen? Also, please comment on whether it's possible that RP knows some operation that the slave does not know about? If not, can we add some CHECK here? src/slave/slave.cpp Lines 6759-6772 (patched) <https://reviews.apache.org/r/63731/#comment268735> In Jan's patch, for old operations, `addOfferOperation` will update slave's `totalResources` because the operation will be speculatively applied. Then, what does that mean to remove those offer opeartion? RP's total resources should already contains all the conversions for old operations. Maybe it's not a good idea to update `totalResources` in `addOfferOperation`? `addOfferOperation` should only update `used` resources? Please think more on that. Also, if we decide to do the above, make sure master code is consistent as well. Please sync with Jan on this. - Jie Yu On Nov. 15, 2017, 5:31 p.m., Benjamin Bannier wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/63731/ > ----------------------------------------------------------- > > (Updated Nov. 15, 2017, 5:31 p.m.) > > > Review request for mesos, Greg Mann, Jie Yu, and Jan Schlicht. > > > Bugs: MESOS-8207 > https://issues.apache.org/jira/browse/MESOS-8207 > > > Repository: mesos > > > Description > ------- > > When resource providers update their state they send a list of > pending or unacknowledged operations to the agent. This patch add > tracking for such operations to the agent. The agent can then forward > these operations to the master, e.g., for calculating the unused > resources behind an agent. > > We track an operation until we either receive a updated list of > pending or unacknowledged operations from a resource provider, or > until we see an acknowledgement from a framework. This keeps the list > of operations bounded and ensures that we maintain the latest > information in the agent. > > > Diffs > ----- > > src/slave/slave.cpp d8bacebc74790e955490a158c37ac0d9e75fd6b5 > > > Diff: https://reviews.apache.org/r/63731/diff/2/ > > > Testing > ------- > > `make check`, still need to implement dedicated tests. > > > Thanks, > > Benjamin Bannier > >