----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/64098/#review192041 -----------------------------------------------------------
Reviewed the non-testing portion. Will continue to review the tests. src/master/master.cpp Lines 6783 (patched) <https://reviews.apache.org/r/64098/#comment270036> 4 space indentation for function arguments. src/master/master.cpp Lines 6788 (patched) <https://reviews.apache.org/r/64098/#comment270046> I think this type of status updates could benefit from a distinct reason for to make it more strongly typed. Could you add ``` v1/mesos.proto: REASON_AGENT_REREGISTERED mesos.proto: REASON_SLAVE_REREGISTERED ``` and use it? Note that the tag numbers in the proto enum need to match. Also note that there are also documentation related changes for these fields: https://github.com/apache/mesos/blob/master/docs/task-state-reasons.md It's fine to make it a separate patch preceding this one. src/master/master.cpp Lines 6789 (patched) <https://reviews.apache.org/r/64098/#comment270044> s/Agent/agent/ src/master/master.cpp Lines 6791-6792 (patched) <https://reviews.apache.org/r/64098/#comment270043> I know that the styling of the ternary operator is terribly inconsistent but could you do this which I think it more widely used? ``` (task.has_executor_id() ? Option<ExecutorID>(task.executor_id()) : None()), ``` There will be a day when we just use clang tidy to fix everything. :) src/master/master.cpp Lines 6793-6797 (patched) <https://reviews.apache.org/r/64098/#comment270041> Should we actually assign these values? ``` protobuf::getTaskHealth(*task), protobuf::getTaskCheckStatus(*task), None(), protobuf::getTaskContainerStatus(*task) ``` Note that the `None`s are default values so you don't have to specify trailing Nones. - Jiang Yan Xu On Nov. 27, 2017, 4:55 p.m., Megha Sharma wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/64098/ > ----------------------------------------------------------- > > (Updated Nov. 27, 2017, 4:55 p.m.) > > > Review request for mesos, Ilya Pronin, James Peach, and Jiang Yan Xu. > > > Bugs: MESOS-6406 > https://issues.apache.org/jira/browse/MESOS-6406 > > > Repository: mesos > > > Description > ------- > > Master will send task status updates to frameworks when an agent > re-registers. > > > Diffs > ----- > > src/master/master.cpp 2ddd67ada3731803b00883b6a1f32b20c1bb238f > src/tests/master_allocator_tests.cpp > 3400d70bb0ba564eac43c4639eee0efd4d8059e6 > src/tests/master_tests.cpp 9c450b9f592d9e09a468f537d9b500e97acc636b > src/tests/partition_tests.cpp e49c474167076b4136a161ed29b11db9a13455a7 > src/tests/persistent_volume_tests.cpp > acfeac16884b00581a3523607ff26f44f6dca53a > src/tests/slave_recovery_tests.cpp c864aa92d9ff128a89dbc25653385de25653f56a > src/tests/upgrade_tests.cpp 7f434dbba858f636719eec24e92b306b76430c4c > > > Diff: https://reviews.apache.org/r/64098/diff/3/ > > > Testing > ------- > > with make check > > > Thanks, > > Megha Sharma > >
