----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/70084/#review213740 -----------------------------------------------------------
Fix it, then Ship it! Thanks for the cleanup! A test to guard regression would be great! src/slave/slave.hpp Line 435 (original), 435 (patched) <https://reviews.apache.org/r/70084/#comment299721> Nit: `None` src/slave/slave.cpp Lines 2991 (patched) <https://reviews.apache.org/r/70084/#comment299722> We have an implicit constructor from repeated resource. Can we get rid of the explicit construction here? src/slave/slave.cpp Lines 2998 (patched) <https://reviews.apache.org/r/70084/#comment299723> lets use the new `*` operator: `... = *(flags.default_container_info);` src/slave/slave.cpp Lines 3001 (patched) <https://reviews.apache.org/r/70084/#comment299724> `publishResources` are put ahead of the other calls. I guess the simplicity outweights the performance concern of wasted work. As one with limited knowledge of this part of the code, I was wondering if we need any cleanup of the `publishResources` in case something goes ary in between. Not in this patch, but adding some comments regarding the cleanup and idempotency of the call would be great. src/slave/slave.cpp Line 2978 (original), 3014 (patched) <https://reviews.apache.org/r/70084/#comment299725> I see that this is equivalent to the original logic, but brevity makes it harder to grasp. A comment regarding taskGroup would be appreaciated. src/slave/slave.cpp Line 3070 (original), 3099-3101 (patched) <https://reviews.apache.org/r/70084/#comment299726> As discussed offline, lets move this down to the lambda where they are captured by value. src/slave/slave.cpp Line 3513 (original), 3508 (patched) <https://reviews.apache.org/r/70084/#comment299727> `*authenticationToken` src/slave/slave.cpp Line 4951 (original), 4944-4946 (patched) <https://reviews.apache.org/r/70084/#comment299728> ditto move comment down src/slave/slave.cpp Line 5108 (original), 5105-5107 (patched) <https://reviews.apache.org/r/70084/#comment299729> ditto - Meng Zhu On March 1, 2019, 5:04 p.m., Chun-Hung Hsiao wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/70084/ > ----------------------------------------------------------- > > (Updated March 1, 2019, 5:04 p.m.) > > > Review request for mesos, Gilbert Song, Greg Mann, Jie Yu, Meng Zhu, and > Vinod Kone. > > > Bugs: MESOS-8467 > https://issues.apache.org/jira/browse/MESOS-8467 > > > Repository: mesos > > > Description > ------- > > When launching executors and tasks, there is no guarantee that the > executors still remain after `Slave::publishResources` is returned. If > not, the executor struct should not be dereferenced and the executor > containers should not be launched at all. > > NOTE: The patch makes `Slave::launchExecutor` called asynchronously even > if there is no secret generator. However this should not affect the > correctness of executor launching. > > > Diffs > ----- > > src/slave/slave.hpp 7ad495504e4ff144ac31812fbd4a3a1f4da86f02 > src/slave/slave.cpp e3c2c005d865b5c333e92e50e49ef398fe06ad79 > > > Diff: https://reviews.apache.org/r/70084/diff/1/ > > > Testing > ------- > > sudo make check > > > Thanks, > > Chun-Hung Hsiao > >