----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/67722/#review205751 -----------------------------------------------------------
src/master/master.cpp Lines 9794-9806 (original), 9794-9809 (patched) <https://reviews.apache.org/r/67722/#comment288620> I personally find the following easier to read than the nested ifs: ``` if (future.isReady() && future.isSome()) { LOG(INFO) << "Successfully authenticated principal '" << future->get() << "'" << " at " << pid; authenticated.put(pid, future->get()); } else if (future.isReady() && !future.isSome()) { LOG(WARNING) << "Authentication of " << pid << " was unsuccessful:" << " Invalid credentials"; } else if (future.isFailed()) { LOG(WARNING) << "An error ocurred while attempting to authenticate " << pid << ": " << future.failure(); } else if (future.isDiscarded()) { LOG(INFO) << "Authentication of " << pid << " was discarded"; } ``` I'm curious about what other people think. src/master/master.cpp Lines 9801-9802 (patched) <https://reviews.apache.org/r/67722/#comment288618> Nit: we try to use leading spaces instead of trailing spaces, so this should be: ``` LOG(INFO) << "Authentication of " << pid << " was unsuccessful:" << " Invalid credentials"; ``` src/master/master.cpp Lines 9807 (patched) <https://reviews.apache.org/r/67722/#comment288619> s/"was discarded"/" was discarded"/ - Gastón Kleiman On July 3, 2018, 3:17 a.m., Alexander Rojas wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/67722/ > ----------------------------------------------------------- > > (Updated July 3, 2018, 3:17 a.m.) > > > Review request for mesos, Gastón Kleiman, Greg Mann, and Vinod Kone. > > > Repository: mesos > > > Description > ------- > > This patch fixes a bug where the code path could cause a crash because > of calling `Fture<T>::get()` on a future which is failed. > > > Diffs > ----- > > src/master/master.cpp ddc8df0ea82241be6c733237feef1553c7669eb2 > > > Diff: https://reviews.apache.org/r/67722/diff/2/ > > > Testing > ------- > > ```sh > make check > ``` > > > Thanks, > > Alexander Rojas > >
