Repository navigation
Complete protocol v2 object-info support - #88
behinddwalls wants to merge 1 commit into
Conversation
|
Thanks for taking this on. I checked it against git's client for this command (fetch-object-info.c on git master, not in a release yet) and they won't work together as is. The client only asks for size when the server advertises Two smaller things: nothing caps how many oids one request can send, and this path skips the |
## Summary ### Why? The object-info implementation was not compatible with the Git client: its capability omitted the supported attribute, missing objects used an invalid numeric sentinel, requests were unbounded, and excluded hosts could start object synchronization. ### What? Advertise `object-info=size`, return protocol-defined empty values for missing objects, cap requests at 1,024 OIDs before sync, and apply the existing placement refusal before any object work. Preserve manifest-versioned positive and negative caching across local and remote-served object access. The healthy request path remains one conditional manifest GET. Warm cache hits and local header lookups add zero bucket reads; remote misses add only the pack range reads required by `RemotePacks::header`. ## Test Plan ✅ `cargo check -p walgit-server` ✅ `cargo test -p walgit-git read_object_info_args_reads_size_and_oids_after_delimiter` ✅ `cargo test -p walgit-server --test e2e info_refs_v2_advertises_capabilities -- --exact` ✅ `cargo test -p walgit-server --test e2e object_info_v2` ✅ `cargo test -p walgit-server --test maintain host_excluded_from_serving_a_repo_refuses_object_work_with_503 -- --exact` ✅ `cargo test -p walgit-server --test e2e fetch_from_front_that_serves_the_base_remotely -- --exact` ✅ `cargo clippy -p walgit-server --all-targets -- -D warnings` ✅ `cargo fmt --all -- --check` ✅ `git diff --check` ## Issue Closes tobi#80
c21254d to
c51b778
Compare
|
Updated object-info compatibility and safeguards in [addressed by agent] |
|
Thanks, this looks a lot better, the advert, the empty size, the cap and the placement check all work now. Two smaller things. All the lookups for one request still go out at the same time, so a big request fires up to 1024 reads at once, it'd be good to cap how many run in parallel. And I think a freshly pushed object can get cached as missing if another sync lands at the same moment, since the cache version is read after the sync. Not caching misses at all would avoid it, they're cheap anyway. |
Summary
Why?
The object-info implementation was not compatible with the Git client: its capability omitted the supported attribute, missing objects used an invalid numeric sentinel, requests were unbounded, and excluded hosts could start object synchronization.
What?
Advertise
object-info=size, return protocol-defined empty values for missing objects, cap requests at 1,024 OIDs before sync, and apply the existing placement refusal before any object work. Preserve manifest-versioned positive and negative caching across local and remote-served object access.The healthy request path remains one conditional manifest GET. Warm cache hits and local header lookups add zero bucket reads; remote misses add only the pack range reads required by
RemotePacks::header.Test Plan
✅
cargo check -p walgit-server✅
cargo test -p walgit-git read_object_info_args_reads_size_and_oids_after_delimiter✅
cargo test -p walgit-server --test e2e info_refs_v2_advertises_capabilities -- --exact✅
cargo test -p walgit-server --test e2e object_info_v2✅
cargo test -p walgit-server --test maintain host_excluded_from_serving_a_repo_refuses_object_work_with_503 -- --exact✅
cargo test -p walgit-server --test e2e fetch_from_front_that_serves_the_base_remotely -- --exact✅
cargo clippy -p walgit-server --all-targets -- -D warnings✅
cargo fmt --all -- --check✅
git diff --checkIssue
Closes #80
Stack