Skip to content

BTree fails to initialize when FileBlockSize > 4096 #17

Open
@benjaminc

Description

@benjaminc

If you have very large nodes (single-node size > 16 MB), you can increase the FileBlockSize to accommodate the larger nodes. This works fine when writing the data, however if you restart your process and it tries to initialize the BTree by reading the data from disk, it will fail in the TransactedCompoundFile.FileSection.Read method when it tries to validate the ActualBlocks count. This is because the Length written during the Write portion was greater than 16 MB, occupying more than 3 bytes, however the first byte was reserved for the header length. When trying to read the length back out, we only get the last 3 bytes of the length, which doesn't match the expected number of ActualBlocks, causing an error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions