Skip to content
This repository has been archived by the owner on Nov 4, 2022. It is now read-only.

support reading blocks of all sizes #236

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

emillynge
Copy link
Contributor

@emillynge emillynge commented Jun 3, 2021

Dear Maintainers,
please accept this PR that fixes #229

This issues causes stenographer to panic, if a query is executed under these circumstances:

  • Stenotype writes blocks that are not 1Mb
  • The query has no criteria or only afterand/or before critieria

Under the above circumstances, the query uses the method BlockFile.AllPackets as a shortcut. This is harcoded to assume that stenotype has written 1MB blocks.

This fix will work, provided that the classes in stenotype extending Packets, ensure that the field block->hdr.bh1.blk_len is populated with the actual size of the block.
This is already the case with PacketsV3 but I do not know whether it is also the case with TestimonyPackets.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BlockFile.AllPackets() fail when using non-standard blocksize
1 participant