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

[compiler] read sequence list fully in tabix parser #10733

Merged
merged 1 commit into from Jul 30, 2021

Conversation

chrisvittal
Copy link
Collaborator

CHANGELOG: Fix a bug in tabix parsing when the size of the list of all sequences is large

BGZipInput stream will (validly) only copy to the end of its internal
buffer on a call to int read(byte[] b, int off, int len). The internal
buffer is at most 64k, so the single read call when reading the
sequences could often not read the entire list. Replacing it with
readFully solves the issue.

CHANGELOG: Fix a bug in tabix parsing when the size of the list of all sequences is large

BGZipInput stream will (validly) only copy to the end of its internal
buffer on a call to `int read(byte[] b, int off, int len)`. The internal
buffer is at most 64k, so the single `read` call when reading the
sequences could often not read the entire list. Replacing it with
readFully solves the issue.
Copy link
Contributor

@tpoterba tpoterba left a comment

Choose a reason for hiding this comment

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

nice! That's dastardly.

@danking danking merged commit 4f94d8e into hail-is:main Jul 30, 2021
daniel-goldstein pushed a commit to daniel-goldstein/hail that referenced this pull request Aug 3, 2021
CHANGELOG: Fix a bug in tabix parsing when the size of the list of all sequences is large

BGZipInput stream will (validly) only copy to the end of its internal
buffer on a call to `int read(byte[] b, int off, int len)`. The internal
buffer is at most 64k, so the single `read` call when reading the
sequences could often not read the entire list. Replacing it with
readFully solves the issue.
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.

None yet

3 participants