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

Fix message extraction behavior for batched messages #33

Merged
merged 1 commit into from
Jul 25, 2023

Conversation

quernd
Copy link
Collaborator

@quernd quernd commented Jul 22, 2023

Fixes #31.

From the gRPC over HTTP2 spec:

DATA frame boundaries have no relation to Length-Prefixed-Message boundaries and implementations should make no assumptions about their alignment.

When multiple messages are batched and read into the buffer, only the first message was extracted. Remaining messages would not be extracted until the next invocation of on_read.

This affects both client and server (only the streaming modes) and all three implementations.

When multiple messages are batched and read into the buffer, only the
first message was extracted. Remaining messages would not be extracted
until the next invocation of `on_read`.
@quernd quernd changed the title Fix client read behavior of batched messages Fix message extraction behavior for batched messages Jul 22, 2023
Copy link
Collaborator

@tmcgilchrist tmcgilchrist left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks reasonable to me. 👍🏻

@quernd
Copy link
Collaborator Author

quernd commented Jul 25, 2023

Thanks @tmcgilchrist!

@quernd quernd merged commit 529501f into main Jul 25, 2023
@tmcgilchrist tmcgilchrist deleted the extract-batched-messages branch July 26, 2023 23:54
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.

eio streaming example only writes one record
2 participants