> On Nov. 13, 2017, 11:07 p.m., Greg Mann wrote: > > src/slave/slave.cpp > > Lines 3800-3803 (patched) > > <https://reviews.apache.org/r/63731/diff/1/?file=1888503#file1888503line3801> > > > > Am I correct in thinking that we usually don't use quotes around IDs > > that we generate ourselves in Mesos? We may be able to remove the quotes > > around `operation_uuid` here.
I explicitly put quotes here since the `UUID` which probably comes from outside (i.e., a framework) could _not_ be deserialized which is suspicous. Makes sense? In any case I'll move this change to a separate RR, https://reviews.apache.org/r/63844/. > On Nov. 13, 2017, 11:07 p.m., Greg Mann wrote: > > src/slave/slave.cpp > > Lines 3814 (patched) > > <https://reviews.apache.org/r/63731/diff/1/?file=1888503#file1888503line3815> > > > > This currently assumes that all operation update acknowledgements are > > for terminal operation updates - is the plan to write it this way for now, > > and then update later if we add intermediate, non-terminal operation states? I added a patch to remove that assumption, https://reviews.apache.org/r/63842/. > On Nov. 13, 2017, 11:07 p.m., Greg Mann wrote: > > src/slave/slave.cpp > > Lines 6777 (patched) > > <https://reviews.apache.org/r/63731/diff/1/?file=1888503#file1888503line6778> > > > > Note that in `addOfferOperation()`, we do `CHECK_SOME(uuid)` after > > grabbing `operation.operation_uuid`. > > > > I'm not sure that always checking the error case is necessary when the > > messages are generated by Mesos, but I mention it here because in the > > `offerOperationUpdateAcknowledgement` handler, you're performing an `if > > (operationUuid.isError())` check on a UUID out of a message from master, so > > the treatment of errors seems inconsistent. These `UUID`s come from us (a resource provider) while above `UUID` came from a framework. I think that justifies the differing treatment. - Benjamin ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/63731/#review190887 ----------------------------------------------------------- On Nov. 15, 2017, 6: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, 6: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 > >
