Coder Social home page Coder Social logo

zookeeper_cpp_client's People

Contributors

baozh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

zookeeper_cpp_client's Issues

有些问题想和你讨论下

  1. zhandle_t 是struct,Reconnect和外部应用调用时存在并发问题,仅靠 外部应用枷锁时无法解决的。失效的zhandle_t应该及时释放,避免内存泄漏。
  2. 存在丢通知的问题,按照事件来处理必定会丢通知(例如在会话超时的那段时间内有数据变化,订阅无法通知到),所以建议采用 数据版本号,异常情况下(会话异常),比对本地与服务器的版本差异,继而得到发现丢失数据变化通知。

选举主时间问题

选主过程中,当主离线后,其余客户端选主时时间很长,请问下是什么原因造成的?

跟楼主讨论些问题

不知道楼主有没有看过zookeeper.h的注释,解决session timeout的重连并没有必要起一个定时器来做。zk的client库会在丢失连接后不停尝试重连,成功重连后,如果已经超时,会触发一个ZOO_EXPIRED_SESSION_STATE的事件,捕获该事件以后就可以做重新建立session的操作。

我自己深知写git项目的不易,但是楼主这个写法难免会误导写zk的新人,建议修改。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.