diff options
author | Jeff Widman <jeff@jeffwidman.com> | 2017-10-05 22:20:42 -0700 |
---|---|---|
committer | Jeff Widman <jeff@jeffwidman.com> | 2017-10-06 14:44:04 -0700 |
commit | 411bc08f214b7afc36f11bde2047096c06467088 (patch) | |
tree | 4e4b70318210b34b80a9c80345739b588e514caa /kafka/errors.py | |
parent | ffc7caef13a120f69788bcdd43ffa01468f575f9 (diff) | |
download | kafka-python-411bc08f214b7afc36f11bde2047096c06467088.tar.gz |
Explicitly check for `None` rather than False
If the group leader somehow gets in a state that it has an empty partition assignment, then `self._assignment_snapshot` will be `{}` which evaluates to `False`. So `self._subscription.mark_for_reassignment()` will never be triggered, even if `self._assignment_snapshot != self._metadata_snapshot`.
Fixes the symptoms of https://github.com/dpkp/kafka-python/issues/1237 although I suspect there's an additional bug in that case that triggers the condition of the the group leader getting an empty partition assignment.
Diffstat (limited to 'kafka/errors.py')
0 files changed, 0 insertions, 0 deletions