Skip to content

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

Merged
danking merged 1 commit into
hail-is:mainfrom
chrisvittal:tabix/fix-parsing
Jul 30, 2021
Merged

[compiler] read sequence list fully in tabix parser#10733
danking merged 1 commit into
hail-is:mainfrom
chrisvittal:tabix/fix-parsing

Conversation

@chrisvittal

Copy link
Copy Markdown
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.

@tpoterba tpoterba left a comment

Copy link
Copy Markdown
Contributor

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.

3 participants