python-zk / kazoo

Kazoo is a high-level Python library that makes it easier to use Apache Zookeeper.
https://kazoo.readthedocs.io
Apache License 2.0
1.3k stars 386 forks source link

fix(exceptions): Register exception for server-side QUOTAEXCEEDED(-125) #721

Closed ztzg closed 1 year ago

ztzg commented 1 year ago

Why is this needed?

Without this, out-of-quota conditions cause Kazoo's request handling thread to die, and the application is left waiting for a non-existent reply and/or does not receive any clue that its Kazoo client handle is not functional anymore.

Proposed Changes

This minimal fix adds the missing definition for QUOTAEXCEEDED.

Subsequent PRs could:

Does this PR introduce any breaking change?

It is not expected to.

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 100.00% and project coverage change: -0.09 :warning:

Comparison is base (2c36d69) 96.65% compared to head (6054d82) 96.56%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #721 +/- ## ========================================== - Coverage 96.65% 96.56% -0.09% ========================================== Files 27 27 Lines 3554 3556 +2 ========================================== - Hits 3435 3434 -1 - Misses 119 122 +3 ``` | [Impacted Files](https://app.codecov.io/gh/python-zk/kazoo/pull/721?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=python-zk) | Coverage Δ | | |---|---|---| | [kazoo/exceptions.py](https://app.codecov.io/gh/python-zk/kazoo/pull/721?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=python-zk#diff-a2F6b28vZXhjZXB0aW9ucy5weQ==) | `100.00% <100.00%> (ø)` | | ... and [3 files with indirect coverage changes](https://app.codecov.io/gh/python-zk/kazoo/pull/721/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=python-zk)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

ceache commented 1 year ago

Thank you @ztzg

ztzg commented 1 year ago

Thank you!