----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/71433/#review217567 -----------------------------------------------------------
Fix it, then Ship it! More readable indeed! src/master/master.cpp Lines 4351-4354 (original), 4347-4350 (patched) <https://reviews.apache.org/r/71433/#comment304833> Either we move this block of comment down to where task status actually generated, or let's expand the comment to cover the whole if block. src/master/master.cpp Lines 4378-4382 (original), 4369-4373 (patched) <https://reviews.apache.org/r/71433/#comment304832> For my own aesthetics, putting the simpler case first. And even better, use continue to avoid the indentation of the main logic in the else part, ditto below. src/master/master.cpp Line 4451 (original), 4430 (patched) <https://reviews.apache.org/r/71433/#comment304835> We could take a breath here and add a comment: // Offers are now validated. src/master/master.cpp Lines 4439-4440 (patched) <https://reviews.apache.org/r/71433/#comment304834> This comment needs to be updated. src/master/master.cpp Lines 4448-4449 (patched) <https://reviews.apache.org/r/71433/#comment304836> Now we are touching this, this part could be improved by avoiding the repeated copying and maybe even some check? (e.g. the single agent validation above). - Meng Zhu On Sept. 4, 2019, 10:52 a.m., Andrei Sekretenko wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/71433/ > ----------------------------------------------------------- > > (Updated Sept. 4, 2019, 10:52 a.m.) > > > Review request for mesos, Benjamin Mahler and Meng Zhu. > > > Bugs: MESOS-1452 and MESOS-9949 > https://issues.apache.org/jira/browse/MESOS-1452 > https://issues.apache.org/jira/browse/MESOS-9949 > > > Repository: mesos > > > Description > ------- > > This patch refactors a loop through offer IDs in `Master::accept()` > into two simpler loops: one loop for the offer validation failure case, > another for the case of validation success, thus bringing removal of > offers and recovering their resources close together. > > This is a prerequisite for implementing `rescindOffer()`/ > `declineOffer()` in the dependent patch. > > > Diffs > ----- > > src/master/master.cpp f00906ef2d33920f23127a74ed141fff9d32865b > > > Diff: https://reviews.apache.org/r/71433/diff/1/ > > > Testing > ------- > > > Thanks, > > Andrei Sekretenko > >
