----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/66143/#review199705 -----------------------------------------------------------
src/slave/slave.cpp Line 2202 (original), 2203-2204 (patched) <https://reviews.apache.org/r/66143/#comment280125> You can keep these on a single line: ``` Future<Nothing> taskLaunch = collect(unschedules) .recover(defer(self(), onUnscheduleGCFailure)) etc... ``` src/slave/slave.cpp Lines 2348 (patched) <https://reviews.apache.org/r/66143/#comment280114> Nit: s/_task/task_/ Preceding underscores are only used to avoid shadowing in function parameters. Here and elsewhere. src/slave/slave.cpp Lines 2320-2321 (original), 2369-2371 (patched) <https://reviews.apache.org/r/66143/#comment280116> Would recommend: ``` return collect(authorizations) .recover(defer(self(), etc... ``` src/slave/slave.cpp Lines 2325-2327 (original), 2375-2377 (patched) <https://reviews.apache.org/r/66143/#comment280128> Let's do: ``` string error = "Failed to authorize " + taskOrTaskGroup(task, taskGroup) + ": " + future.failure(); ``` src/slave/slave.cpp Lines 2386 (patched) <https://reviews.apache.org/r/66143/#comment280118> Let's make this variable a reference instead to avoid the copy: ``` list<bool>& authorizations = future.get(); ``` src/slave/slave.cpp Lines 2399-2400 (patched) <https://reviews.apache.org/r/66143/#comment280119> Indentation: ``` } else if (executorInfo.has_command() && executorInfo.command().has_user()) { ``` or ``` } else if ( executorInfo.has_command() && executorInfo.command().has_user()) { ``` src/slave/slave.cpp Lines 2404-2406 (patched) <https://reviews.apache.org/r/66143/#comment280120> Let's do: ``` string error = "Task '" + stringify(_task.task_id()) + "'" " is not authorized to launch as user '" + user + "'"; ``` src/tests/slave_tests.cpp Line 4137 (original), 4140 (patched) <https://reviews.apache.org/r/66143/#comment280136> s/tie reaching the critical moment when to kill the task to `_run`./so that we can control when the task is killed./ Here and below. - Greg Mann On March 20, 2018, 9:47 p.m., Meng Zhu wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/66143/ > ----------------------------------------------------------- > > (Updated March 20, 2018, 9:47 p.m.) > > > Review request for mesos, Chun-Hung Hsiao and Greg Mann. > > > Bugs: MESOS-8617 and MESOS-8624 > https://issues.apache.org/jira/browse/MESOS-8617 > https://issues.apache.org/jira/browse/MESOS-8624 > > > Repository: mesos > > > Description > ------- > > This helps to encapsulate a task launch into a single > future which will come in handy when enforcing the task > launch order. > > Affected tests are also updated. > > > Diffs > ----- > > src/slave/slave.hpp 37f0361251524e63d02d251e8a03901812b8affb > src/slave/slave.cpp 915d4f1bbd642ca5d2587cfdd846262cb7e08788 > src/tests/mock_slave.hpp 8ec2b65a75f774d970ef6507df8b0c02fda5f2fd > src/tests/mock_slave.cpp 8ec55b6aa84dd8b1c3743cbcdc246311585d0f63 > src/tests/slave_tests.cpp f76500ebdb67f131a57a3b5aaae8c952d019e354 > > > Diff: https://reviews.apache.org/r/66143/diff/3/ > > > Testing > ------- > > make check > > > Thanks, > > Meng Zhu > >
