Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore lookup_coordinator result in commit_offsets_async #1712

Merged
merged 2 commits into from
Mar 13, 2019
Merged
Changes from 1 commit
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
Next Next commit
When doing commit_offset_async after lookup_coordinator, need to wrap…
… the actual call in a partial application to ignore the result from lookup_coordinator
  • Loading branch information
asafflesch committed Feb 11, 2019
commit d2fe82d3e0317a5349142f1160a14ab36059ea5d
3 changes: 2 additions & 1 deletion kafka/coordinator/consumer.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import collections
import copy
import functools
import logging
import time

Expand Down Expand Up @@ -457,7 +458,7 @@ def commit_offsets_async(self, offsets, callback=None):
# same order that they were added. Note also that BaseCoordinator
# prevents multiple concurrent coordinator lookup requests.
future = self.lookup_coordinator()
future.add_callback(self._do_commit_offsets_async, offsets, callback)
future.add_callback(lambda r: functools.partial(self._do_commit_offsets_async, offsets, callback))
if callback:
future.add_errback(lambda e: self.completed_offset_commits.appendleft((callback, offsets, e)))

Expand Down