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

Support multiple requests with single window ack on shared connection #1144

Merged
merged 1 commit into from
Jul 12, 2024

Conversation

jfallows
Copy link
Contributor

@jfallows jfallows commented Jul 12, 2024

Description

We are using flow control budget to manage multiple requests on shared connection from pool, so multiple small requests can successfully claim non-fragmented budget and send both requests.

They could arrive in any order in practice. When sent via TLS, there is potential for batching at encryption layer so a single window can be received to ack both requests in the aggregate.

When we distribute the flow control credit to each stream, we need to make sure not to over credit beyond the amount actually sent by each stream. Otherwise, we would not hit the condition to precisely ack the data sent by the first stream, and therefore it is not removed from the queue, blocking ack for all subsequent streams.

When this occurs, subsequent streams on the shared connection in the pool will eventually reach zero window and stall.

Also, when connection pool is disabled, SASL needs multiple requests to complete, so if a flush arrives on the group stream, queuing the SyncGroupRequest, we need to make sure it is processed after SaslAuthenticateRequest etc.

@jfallows jfallows requested a review from akrambek July 12, 2024 04:28
@jfallows jfallows enabled auto-merge (squash) July 12, 2024 04:41
@jfallows jfallows merged commit 82b8387 into aklivity:develop Jul 12, 2024
5 checks passed
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