Skip to content
Snippets Groups Projects
Commit 6b6c8a3f authored by James Bonfield's avatar James Bonfield Committed by Rob Davies
Browse files

Bug fixes to multi-slice containers (mostly threading related).

1) When skipping past slices to find one that overlaps the start of
our region, don't free container here (affects non-threading also).
Fixes a crash reported by xiaofeng.liu@sentieon.com.

2) Don't cache cram_get_block_by_id values in the codec as multiple
slices may be decoding in parallel using the same codec.  This also
removes the need for the reset function.

Instead we use the already existing per-slice lookup array, but
improved so it works (mostly without linear scan) on large ID aux
blocks too.  We could conceivably go the whole hog of using a hash
table, but I think it's overkill and this is minimum code.

3) We now distinguish between fd->ctr, c->curr_slice (being consumed
by get_seq calls) and fd->ctr_mt, c->curr_slice_mt (the read-ahead
for dispatching thread tasks).  Similarly for EOF / OOC (out of
container) parameters.

4) Cram multi-threaded flush now does the freeing of containers
better.

5) Added a larger input file of 1000 reads and a test using
multi-slice containers.

Also added the ability to debug the test harness with e.g. valgrind

Set the TEST_PRECMD first.  For example:

    TEST_PRECMD="valgrind --leak-check=full" make check
parent 831747f2
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment