Repository navigation
Conversation
Retain upload failures across ref updates and log the upload barrier before hooks. Recover stale pack indexes with one coalesced refresh while preserving known-object reads. Exercise the real S3 SDK and Tigris storer over HTTP and SSH with gated and failed uploads. End HTTP shallow-discovery responses at their flush to avoid an extra NAK. Add personal-cluster validation instructions. Refs: #28 Assisted-by: GPT-6 via Codex Signed-off-by: Xe Iaso <xe@tigrisdata.com>
Let long-lived readers retry pack discovery after missing probes and storage errors. Coalesce concurrent refreshes and wait one second after each attempt before allowing another scan. Keep known objects readable. Forward HTTP upload request packets without rebuilding or sorting the wants list. Release the pooled packet buffer after negotiation. Add recovery, cancellation, framing, and allocation benchmarks. Refs: #28 Assisted-by: GPT-6 via Codex Signed-off-by: Xe Iaso <xe@tigrisdata.com>
There was a problem hiding this comment.
🔵 Needs a closer look
Concurrent storage refresh and wire-protocol changes warrant human review, with live-bucket and cluster validation still pending.
0 open findings
What changed in this PR
Hardens ObjGit’s pack publication and reader recovery for issue #28 without claiming to resolve the unconfirmed production cause.
Changes:
- Keeps upload failures fatal and logs the publication barrier before hooks.
- Adds coalesced pack-index refreshes and corrects HTTP shallow-response framing.
- Expands regression coverage and documents operator validation.
| File | Description |
|---|---|
internal/storage/tigris/visibility_test.go |
Tests refresh recovery, concurrency, and cancellation. |
internal/storage/tigris/upload.go |
Preserves the first upload failure. |
internal/storage/tigris/tigris.go |
Supports configured S3 clients. |
internal/storage/tigris/publication_test.go |
Tests upload ordering and failed publication. |
internal/storage/tigris/packindex.go |
Adds coalesced refreshes with cooldowns. |
internal/storage/tigris/objects.go |
Refreshes packs after object misses. |
internal/storage/tigris/livebucket_test.go |
Verifies published objects through fresh readers. |
internal/storage/tigris/client_test.go |
Adds upload gates to the storage fixture. |
docs/usage/pack-publication-check.md |
Provides cluster validation steps. |
docs/plans/2026-10-15-issue-28-pack-visibility.md |
Records investigation, implementation, and validation. |
docs/architecture/transports.md |
Explains HTTP shallow-response handling. |
docs/architecture/tigris-storer.md |
Documents upload failures and refresh behavior. |
docs/architecture/hooks.md |
Clarifies publication-before-hook ordering. |
cmd/objgitd/uploadpack.go |
Adds bounded HTTP shallow-round handling. |
cmd/objgitd/uploadpack_test.go |
Tests packet forwarding and response framing. |
cmd/objgitd/ssh_test.go |
Checks wait-log ordering before SSH hooks. |
cmd/objgitd/s3_publication_test.go |
Exercises publication and fetches through HTTP/SSH. |
cmd/objgitd/receivepack.go |
Logs before the publication barrier. |
cmd/objgitd/publication_test.go |
Tests publication barriers and callback behavior. |
cmd/objgitd/http.go |
Routes fetches through the HTTP adapter. |
cmd/objgitd/http_test.go |
Checks wait-log ordering before HTTP hooks. |
cmd/objgitd/hooks_test.go |
Adds a shared log-order assertion. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
A failed pack refresh made a read return a storage error. During fetch negotiation go-git only tolerates ErrObjectNotFound for an unknown have, so one bad listing failed the whole upload-pack. A miss now reads as absent when the refresh fails, and the failure is logged once per attempt. A canceled storer still reports the cancellation. The refresh cooldown now adapts. An attempt that finds no new pack, or fails, doubles the next cooldown up to ten seconds. An attempt that finds a pack resets it to one second. This stops a long list of unknown haves from listing the bucket over and over. A pack whose upload failed is now forgotten, so a later refresh can load it if the bucket has it after all. A pack that this storer registers during a refresh is never loaded twice. The HTTP shallow-discovery fix now lives in a small fork of go-git's UploadPack. It ends the response at the shallow-update flush when the request body is exhausted after the deepen. Receive-pack drops its own "waiting for packfiles" log. The storer already flushes every pack upload before it publishes a ref, and TestTigrisPushPublication checks that order. Refs: #28 Assisted-by: Claude Opus 5.5 via Claude Code Signed-off-by: Xe Iaso <xe@tigrisdata.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
packs/*.cueagain. Concurrent misses share one refresh, and a cooldown limits how often the reader lists the bucket.Refs #28. We do not know the cause of the production failure yet, so this PR does not close the issue.
Details
Pack refresh
ErrObjectNotFound. go-git accepts only that error for an unknownhave. Any other error stops the whole upload-pack. The storer logs each failed refresh once, at warn level. A canceled storer still returns the cancellation error.Upload-pack
uploadpack.gocontains a small fork of go-git'stransport.UploadPack. When a stateless request contains a deepen and nothing follows it, the fork writes the shallow update and returns. All other requests use the upstream code path.Receive-pack
waiting for packfiles to finish pushinglog line is removed. The storer already makes the uploads finish before it publishes a ref.TestTigrisPushPublicationholds the fake S3 uploads open and checks that order.Tests and docs
docs/architecture/{hooks,tigris-storer,transports}.mddescribe the new behavior.docs/usage/pack-publication-check.mdcontains the procedure to validate on a personal cluster.Test plan
go build ./...go veton the changed packagesgo test ./.... The commit hook also ran it.docs/usage/pack-publication-check.md.The bucket consistency requirements do not change.