----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/66919/#review202416 -----------------------------------------------------------
LGTM It's hard to write a test for this but we can probably modify a test in master_maintenance_tests.cpp to observe the check failure. Let's also check Joseph with the comment here. https://github.com/apache/mesos/blob/520b729857223aeade345cbdf61209ec4f395ad9/src/master/maintenance.hpp#L39 src/master/http.cpp Lines 4163-4165 (patched) <https://reviews.apache.org/r/66919/#comment284233> The following will be more idiomatic. ``` .onAny([](const Future<bool>& result) { CHECK_READY(result); }) ``` Note the spaces and const ref. It'll be helpful to get familiarize with https://github.com/apache/mesos/blob/master/docs/c%2B%2B-style-guide.md which in turn references https://google.github.io/styleguide/cppguide.html - Jiang Yan Xu On May 3, 2018, 9:43 a.m., Xudong Ni wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/66919/ > ----------------------------------------------------------- > > (Updated May 3, 2018, 9:43 a.m.) > > > Review request for mesos and Jiang Yan Xu. > > > Bugs: MESOS-8630 > https://issues.apache.org/jira/browse/MESOS-8630 > > > Repository: mesos > > > Description > ------- > > When the registrar fails to update the registry it would abort the > actor and fail all future operations,However when the registrar > updates is requested by an operator API such as maintenance update, > the master process doesn't shut down (a 500 error is returned to the > client instead)and all subsequent operations will fail. > > Review: https://reviews.apache.org/r/66919 > > > Diffs > ----- > > src/master/http.cpp 135ae4389623385a6638158f5f23d6daca14a0ad > > > Diff: https://reviews.apache.org/r/66919/diff/1/ > > > Testing > ------- > > No error found by running all unit tests(make check) > > > Thanks, > > Xudong Ni > >