Skip to content

Conversation

@abhishek593
Copy link

@abhishek593 abhishek593 commented Jan 24, 2026

Rationale for this change

ReadMessageAsync takes a body_length parameter and reads Message metadata + body in one go, but the blocking version ReadMessage reads the body length from the Message and issues a second read for the body. This PR adds a ReadMessage overload that takes the body length as parameter and does a single read like the async version does.

What changes are included in this PR?

  • Added ReadMessage overload accepting body_length
  • Updated ReadMessageFromBlock to use the new ReadMessage overload when reading full record batches.
  • Added new ReadBodyWithLength test case and updated IO range validation tests.

Are these changes tested?

Yes, added TestReadMessage.ReadBodyWithLength and updated other tests to use the new overload.

Are there any user-facing changes?

No.

@github-actions
Copy link

⚠️ GitHub issue #48846 has been automatically assigned in GitHub to PR creator.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant