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

Propagate timeout to _retrieve_offsets #33

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

kmichel-aiven
Copy link

@kmichel-aiven kmichel-aiven commented Oct 5, 2024

The default timeout of _retrieve_offsets is infinite, this makes the
Consumer block indefinitely even if poll was called with a timeout.

Propagate the timeout from the Consumer to the Fetcher operation,
removing some of the timeout as more and more sub-operation
consume the total allowed timeout.

During a poll operation, the timeout for positions and offsets is
kept separate because poll will always keep running and accumulate
messages until the end of the timeout. We want to be able to poll
messages for a short time (or for zero time, the default) while allowing
some delay when retrieving the positions.

Once _retrieve_offsets is fixed, the same problem happens with
ensure_coordinator_ready, this is fixed by the second commit.

@kmichel-aiven kmichel-aiven force-pushed the kmichel-timeout-on-offsets branch from 3a9434b to a582aeb Compare October 5, 2024 14:50
The default timeout of _retrieve_offsets is infinite, this makes the
Consumer block indefinitely even if poll was called with a timeout.

Propagate the timeout from the Consumer to the Fetcher operation,
removing some of the timeout as more and more sub-operation
consume the total allowed timeout.

During a `poll` operation, the timeout for positions and offsets is
kept separate because poll will always keep running and accumulate
messages until the end of the timeout. We want to be able to poll
messages for a short time (or for zero time, the default) while allowing
some delay when retrieving the positions.
@kmichel-aiven kmichel-aiven force-pushed the kmichel-timeout-on-offsets branch from a582aeb to d8dbea2 Compare October 5, 2024 14:54
The default timeout of ensure_coordinator_ready is infinite, this makes the
Consumer block indefinitely even if poll was called with a timeout.
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.

1 participant