Skip to content
This repository has been archived by the owner on Mar 24, 2021. It is now read-only.

Commit

Permalink
Merge pull request #771 from Parsely/bugfix/delete_nonode
Browse files Browse the repository at this point in the history
catch nonodeerror when relinquishing partition
  • Loading branch information
Emmett J. Butler committed Feb 27, 2018
2 parents a4b6793 + db76558 commit e9dd6d2
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pykafka/balancedconsumer.py
Original file line number Diff line number Diff line change
Expand Up @@ -617,8 +617,11 @@ def _remove_partitions(self, partitions):
:type partitions: Iterable of :class:`pykafka.partition.Partition`
"""
for p in partitions:
# TODO pass zk node version to make sure we still own this node
self._zookeeper.delete(self._path_from_partition(p))
try:
# TODO pass zk node version to make sure we still own this node
self._zookeeper.delete(self._path_from_partition(p))
except NoNodeException:
pass

def _add_partitions(self, partitions):
"""Add partitions to the zookeeper registry for this consumer.
Expand Down

0 comments on commit e9dd6d2

Please sign in to comment.