kafka-python icon indicating copy to clipboard operation
kafka-python copied to clipboard

Defer version check until after bootstrap succeeds

Open dpkp opened this issue 7 years ago • 4 comments

Separated from #1411 . This PR moves version checking from __init__ into _bootstrap . This means that if a cluster is down and bootstrapping fails, version checking will not cause an exception to be raised immediately. Instead, we wait until the initial bootstrap succeeds and then run version checks. In order to handle this I've changed the "unset" version from None to (0, 0). This also allows us to simplify version checking code internally. (0, 0) should cause us to use the lowest available version (likely 0.8.2) if needed but still flag that version checking has not yet happened.


This change is Reviewable

dpkp avatar Mar 09 '18 01:03 dpkp

I like this PR's goal of creating a stronger separation btween the "liveness" check from the "which version" check.

jeffwidman avatar Mar 16 '18 01:03 jeffwidman

What's needed to push this across the line?

jeffwidman avatar Apr 26 '18 21:04 jeffwidman

Going to leave this out of 1.4.X patch release as it seems like a largish change. Will land for next release.

dpkp avatar Nov 20 '18 15:11 dpkp

Did this land in 2.0?

kurtmckee avatar Mar 10 '22 22:03 kurtmckee