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

KAYAK-3387 Most Consumer operations are blocking and interruptible #835

Merged
merged 3 commits into from
Jan 9, 2024

Conversation

zcox
Copy link
Collaborator

@zcox zcox commented Jan 9, 2024

KAYAK-3387 These consumer operations are synchronous and blocking. The calling thread is blocked until results are returned. There may be some asynchronous I/O down underneath in the Java consumer, but we don't have access to it. These operations should thus be shifted to cats-effect's blocking context/thread pool, so that no threads in the compute pool are blocked.

This PR uses interruptible instead of just blocking. There is evidence that Thread.interrupt will actually interrupt/cancel the underlying operations.

Also removed some unneeded trace/debug logging from the consumer.

Reference: CE3 thread model.

@zcox zcox requested a review from a team as a code owner January 9, 2024 16:18
@zcox zcox changed the title KAYAK-3387 Consumer poll, commitSync, and close are blocking and interruptible KAYAK-3387 Most Consumer operations are blocking and interruptible Jan 9, 2024
@zcox zcox merged commit 920f8c7 into Banno:main Jan 9, 2024
5 checks passed
@zcox zcox deleted the consumer-blocking branch January 9, 2024 18:48
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.

3 participants