> On Jan. 27, 2014, 9:38 p.m., Benjamin Hindman wrote: > > src/state/zookeeper.cpp, line 73 > > <https://reviews.apache.org/r/17440/diff/1/?file=452615#file452615line73> > > > > But we aren't connecting! The 'zk' handle is set to NULL on the line > > above. What was the problem with DISCONNECTED? That was used originally in > > GroupProcess as well. > > Jiang Yan Xu wrote: > My thinking is that DISCONNECTED is a state that we set but never check > against. We didn't event check against CONNECTING. So we basically only > needed one state other than CONNECTED in the old code (which is renamed to > READY).
I reversed the changes to state/zookeeper and instead now use a 'reconnect' boolean maintained by state/zookeeper to replicate the original logic in watcher.hpp. I think keeping track of state changes through the 'state' variable is useful for Group though. Right now state/zookeeper doesn't have the sophistication of retries and local session timeouts that Group has so I guess it's not necessary to copy Group's state machine. - Jiang Yan ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/17440/#review32956 ----------------------------------------------------------- On Jan. 30, 2014, 12:42 p.m., Jiang Yan Xu wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/17440/ > ----------------------------------------------------------- > > (Updated Jan. 30, 2014, 12:42 p.m.) > > > Review request for mesos, Benjamin Hindman, Ben Mahler, and Vinod Kone. > > > Bugs: MESOS-937 > https://issues.apache.org/jira/browse/MESOS-937 > > > Repository: mesos-git > > > Description > ------- > > Description in JIRA: "Between the execution of > ProcessWatcher::~ProcessWatcher() and its base class destructor > Watcher::~Watcher(), the pure virtual method Watcher::process() can be > invoked by WatcherProcess::event()." > > By eliminating WatcherProcess this problem is resolved. > > > Diffs > ----- > > src/state/zookeeper.hpp d1d1fedf27987aeaf9fbdee678d3b3848d05620a > src/state/zookeeper.cpp 09b63d44e9349cab2d73659c939de3d8e96fbcc5 > src/zookeeper/group.hpp e51ebb2cf5f09a633462c101f913ee8272be9a6c > src/zookeeper/group.cpp ecb6c002e8194b8d67e262826d988f747414f9f3 > src/zookeeper/watcher.hpp 1db0386719c2a675d29b47b417dc856993062326 > src/zookeeper/zookeeper.hpp f50aca6e7035c8084c3e76fd56b9d1ef7f9d9902 > src/zookeeper/zookeeper.cpp 5720f4c1cd51c4d998b52e7bf7f9f019ae80c5f8 > > Diff: https://reviews.apache.org/r/17440/diff/ > > > Testing > ------- > > make check locally and on Jenkins. > > > File Attachments > ---------------- > > ZK Client States > > https://reviews.apache.org/media/uploaded/files/2014/01/28/59be560e-3e4a-407a-acc9-baf07183fe32__ZooKeeper_client_states.jpg > > > Thanks, > > Jiang Yan Xu > >