aboutsummaryrefslogtreecommitdiff
path: root/objectstore/packed/pack_idx_checksum.go
Commit message (Collapse)AuthorAgeFilesLines
* *: objectstore -> object/storeGravatar Runxi Yu2026-03-251-34/+0
|
* *: objectid -> object/idGravatar Runxi Yu2026-03-251-1/+1
|
* *: LintGravatar Runxi Yu2026-03-041-0/+4
|
* objectstore/packed: Check pack/idx checksums here.Gravatar Runxi Yu2026-03-031-0/+30
We previously had helpers in format/pack/checksum that checks .pack/.idx-related checksums with []byte-based APIs. But it only really makes sense to use those []byte-based APIs on mmap's (otherwise it'd be horribly inefficient). Since the packed object-store only needs to check that the .pack and .idx trailer match, we move the relevant part into objectstore/packed. The rest are deleted for now; we'll definitely need a streaming version for the pack verification (when ingesting packfiles from the network) (though we might just make it a streaming API (writer? reader? not decided yet) that *produces* a hash, then verify it in the caller; this way we could reuse the function in the pack-producing routines). The others might get the []byte-based APIs back, or perhaps they too get streaming APIs. Remember that "reading objects from a packed object store", "creating/writing packfiles", and "ingesting an incoming pack (which usually involves creating an .idx for it)", are all very different tasks.