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

bindings/go: Fix bug with incomplete reads #176

Merged
merged 1 commit into from
Jun 23, 2023
Merged

Conversation

varungandhi-src
Copy link
Contributor

Test plan

Added regression test

@varungandhi-src varungandhi-src changed the title bindings/go: Simplify type conversions & reuse buffer bindings/go: Fix bug with incomplete reads Jun 22, 2023
@tjdevries
Copy link
Contributor

Did this go test failure just start happening? or was this from before?

@varungandhi-src
Copy link
Contributor Author

That failure is entirely unrelated to this PR AFAICT, not sure why it's coming up but will look into it tomorrow before merging.

Base automatically changed from vg/tweak to main June 22, 2023 13:48
Using Reader.read doesn't guarantee that the buffer passed
will be filled if enough data is available, and the buffer
has enough space. This meant that sometimes an initial Read
call would not suffice for large Document data.

Use ReadAtLeast to avoid that.
@varungandhi-src
Copy link
Contributor Author

Perhaps an artifact of targeting a branch other than main, doesn't seem to be any issue any more.

@varungandhi-src varungandhi-src merged commit a5e3a22 into main Jun 23, 2023
@varungandhi-src varungandhi-src deleted the vg/fix-read branch June 23, 2023 04:59
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