> On Sept. 16, 2014, 11:20 a.m., Ben Mahler wrote: > > src/master/detector.cpp, lines 396-404 > > <https://reviews.apache.org/r/25663/diff/1/?file=689921#file689921line396> > > > > Any way to explicitly ignore the no node case? > > > > Here we're ignoring all failures, which is a bit scary, since it's not > > obvious why the more serious errors would be caught elsewhere. > > > > I haven't put a lot of thought into this, could we return a > > Future<Option<string> > data? Or should we consider wrapping our things in > > some kind of ZKOperation<string> which lets us look at the various error > > cases? > > > > Happy to chat further!
Yeah I was (unnecessarily) concerned about the ambiguity of returning a None if the method is changed to: "Result<Option<string> > GroupProcess::doData(const Group::Membership& membership)". Group needs to interpret the three different cases from the return value: 1. retryable error -> retry 2. nonode -> None 3. non-retryable error -> Failure It turns out it's not that hard and we have precedence in the code base: https://github.com/apache/mesos/blob/190e87c51d25646fa501ffca0bf7150157982050/src/state/zookeeper.cpp#L427 So I revised the review to have Group return a None in the case of NONODE. - Jiang Yan ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/25663/#review53558 ----------------------------------------------------------- On Sept. 17, 2014, 11:12 a.m., Jiang Yan Xu wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/25663/ > ----------------------------------------------------------- > > (Updated Sept. 17, 2014, 11:12 a.m.) > > > Review request for mesos and Ben Mahler. > > > Bugs: MESOS-1392 > https://issues.apache.org/jira/browse/MESOS-1392 > > > Repository: mesos-git > > > Description > ------- > > See summary. > > > Diffs > ----- > > src/log/network.hpp fc85a57a38f89190fe246f16cd1fde3168d70613 > src/master/detector.cpp 6436b8ee7e1ab6451a6b999a1cfbb2f79190e6ca > src/tests/group_tests.cpp 7ed98956181f167e16cd723c049738f1c217c73b > src/zookeeper/group.hpp 16f9b7b390551402e3c1eddaf5657aa18766b47c > src/zookeeper/group.cpp 58491c01052b68ddaee6af32f33192d5a1f20e58 > > Diff: https://reviews.apache.org/r/25663/diff/ > > > Testing > ------- > > make check. > > > Thanks, > > Jiang Yan Xu > >