Skip to content

Hash resume for very large files #159

Description

@crass

What problem would this solve?

Currently oans must start hashing a file from the beginning everytime a hash is needed. For example, if a 1Tb file is 6hours in to hashing and the oans process is interrupted (power outtage, OOM, ctrl+c, etc.), rerunning oans will have to start rehashing the large file from the beginning.

Proposed solution

Rehashing from the beginning must be done because the current digest is a hash of individual bytes and xxhash is not additive. Instead have the file hash be a hash of the extent hashes and the extent hash be a hash of the block hashes as suggested in #158.

Also, this will require #157, otherwise there will never be block or extent records for files in the middle of being hashed when an interruption occurs.

Alternatives considered

No response

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