Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion kafka/consumer/fetcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,8 @@ def _handle_list_offsets_response(self, future, response):
def _fetchable_partitions(self):
fetchable = self._subscriptions.fetchable_partitions()
# do not fetch a partition if we have a pending fetch response to process
discard = {fetch.topic_partition for fetch in self._completed_fetches}
# use copy.copy to avoid runtimeerror on mutation from different thread
discard = {fetch.topic_partition for fetch in self._completed_fetches.copy()}
current = self._next_partition_records
if current:
discard.add(current.topic_partition)
Expand Down
Loading