Coder Social home page Coder Social logo

Comments (2)

i3wangyi avatar i3wangyi commented on September 1, 2024

Do I understand it right? I just want to understand the whole picture more clearly since there's a bunch of race-condition issues happened recently.

  1. The "frequent" leadership switch is caused by ZK session expiration.
  2. What caused the "frequent" ZK session expiration?
  3. Why the new controller didn't successfully register the callback handlers?
  4. Is it because the 1st new controller hasn't finished the registration and it lost leadership already then the 2nd new controller came to place?

from helix.

jiajunwang avatar jiajunwang commented on September 1, 2024

Do I understand it right? I just want to understand the whole picture more clearly since there's a bunch of race-condition issues happened recently.

  1. The "frequent" leadership switch is caused by ZK session expiration.

Yes.

  1. What caused the "frequent" ZK session expiration?

This is not confirmed. Maybe GC, maybe network issue. Or combined. The result is obvious though.

  1. Why the new controller didn't successfully register the callback handlers?

Please refer to the fix. The previous design cannot handle more than one leader node change event in a graceful way.
This use case is just not considered.

  1. Is it because the 1st new controller hasn't finished the registration and it lost leadership already then the 2nd new controller came to place?

The 1st controller does lose the leadership, but that does not cause the problem. The issue was in one controller always. If this one has a leftover controller change event unprocessed, it will for sure fall into this bad situation.

from helix.

Related Issues (20)

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.