Skip to content

Reduce small-object storage work in Git import - #129

Merged
carsonfarmer merged 1 commit into
mainfrom
cf/git-small-objects
Sep 28, 2026
Merged

carsonfarmer merged 1 commit into
mainfrom
cf/git-small-objects

Conversation

@carsonfarmer

@carsonfarmer carsonfarmer commented Sep 28, 2026 •

Copy link
Copy Markdown
Owner

A first import of this repository published its refs but exceeded the request deadline before confirming success to the client. Small compressed objects required separate WAL writes and reads on S3. Keep objects up to 2 KiB in more tightly packed catalog leaves, with explicit pending-byte admission and the existing fixed leaf allowance. Preserve useful incoming deltas for fetch. This adds 26 runtime Go lines and changes no WAL API, dependency or operation limit.

Validation: independent make check, all four CI checks, Go race/vet, viewer lint/types/17 tests, and the full unchanged-client Spin/MinIO provider suite. Both hash formats pass cold clones/fsck, delta reuse before and after maintenance, and forced pending-budget spills with exact file bytes. Independent correctness and simplification review approved the exact diff.

Against live S3, the same 6,578-object first push now completes with Git confirming success in 203.470 seconds, using 7,511 backend attempts instead of the previous 19,253. Clone, increment, fetch and cold clone preserve exact refs/files and pass strict fsck. A separate completed 572-object comparison on the same warmed host reduced push from 40.640 to 23.135 seconds, clone from 15.333 to 9.664, and fetch from 5.924 to 3.034. Every operation used fewer requests; warmed cgroup peaks stayed near 216 MiB. Inline catalog data increases some read and incremental-transfer bytes. These are single WAN samples, with unchanged limits and no restarts.

Closes #128.

Inline compressed objects up to 2 KiB and split new leaves at 128 items while retaining the 1,024-item read limit and fixed 512 KiB inline payload pool. Bound pending full-inline payload by the catalog budget and former per-pack allowance, credit replacements, and spill through the existing byte writer. Preserve useful inline deltas for outgoing Git packs.

Co-authored-by: Codex <noreply@openai.com>
@carsonfarmer
carsonfarmer merged commit 2c348c9 into main Sep 28, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reduce small-object S3 work during Git import

1 participant