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

Move callback processing from BrokerConnection to KafkaClient #1258

Merged
merged 1 commit into from
Oct 21, 2017

Conversation

dpkp
Copy link
Owner

@dpkp dpkp commented Oct 16, 2017

This is a small refactor to how response callbacks are processed. It is designed to separate the callback chain processing from the network processing code. This will allow us to use a threading lock around client networking that can be released before processing callbacks to reduce the risk of deadlock. This approach is derived from KAFKA-3888 / KIP-62 (background heartbeat thread).

@dpkp
Copy link
Owner Author

dpkp commented Oct 18, 2017

This PR handles the success case, but network failures in BrokerConnection.send / .recv still handle future.failure() inline. I am going to think a bit about how best to handle this so that both callbacks and errbacks can be handled in isolation (avoiding locking issues w/ background thread)

@tvoinarovskyi
Copy link
Collaborator

Lgtm

@tvoinarovskyi
Copy link
Collaborator

Merging this to lessen the burden of reviewing #1266

@tvoinarovskyi tvoinarovskyi merged commit 146b893 into master Oct 21, 2017
@jeffwidman jeffwidman deleted the pending_completions branch October 22, 2017 03:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants