Skip to content

Remove cram seek ability to do range queries via SEEK_CUR.#1878

Merged
daviesrob merged 1 commit intosamtools:developfrom
jkbonfield:fix_1877
Jan 27, 2025
Merged

Remove cram seek ability to do range queries via SEEK_CUR.#1878
daviesrob merged 1 commit intosamtools:developfrom
jkbonfield:fix_1877

Conversation

@jkbonfield
Copy link
Contributor

This was a feature that came all the way from the initial index support added to io_lib, but I think it's a misfeature. The consequence of it is on failing with a SEEK_SET (eg network error, or file corruption) it falls back to doing a read-and-discard loop to simulate the seek via SEEK_CUR.

This may perhaps be of use when querying stdin, but it's highly unlikely for us to be doing that while also having an index on disk and it's not something we support with other formats.

Fixes #1877

This was a feature that came all the way from the initial index
support added to io_lib, but I think it's a misfeature.  The
consequence of it is on failing with a SEEK_SET (eg network error,
or file corruption) it falls back to doing a read-and-discard loop to
simulate the seek via SEEK_CUR.

This may perhaps be of use when querying stdin, but it's highly
unlikely for us to be doing that while also having an index on disk
and it's not something we support with other formats.

Fixes samtools#1877
@daviesrob daviesrob merged commit 1f338eb into samtools:develop Jan 27, 2025
9 checks passed
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.

Iterator query over network stuck with CRAM on FTP

2 participants