Skip to content

crc checksum for header (key + value sizes) #30

@funny-falcon

Description

@funny-falcon

If data will be corrupted, then key+value size could be decoded into large value: unneccessary allocations and unneccessary disk read will follow.

It is better to add checsum for key+value size header to early detect such corruption.

And then crc32 checksum for data path could be resided in a header as well, therefore there will be no need to allocate buffer for both header and data.

I suppose, header could have following structure:

keySize = 2 bytes
typeAndValueSize = 4 bytes
dataCRC = 4 bytes
headerCRC = 4 bytes
Therefore headerCRC will check dataCRC as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions