All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] packfile URIs: support concurrent downloads
@ 2026-07-13 22:34 Ted Nyman
  2026-07-13 22:48 ` Junio C Hamano
  0 siblings, 1 reply; 8+ messages in thread
From: Ted Nyman @ 2026-07-13 22:34 UTC (permalink / raw)
  To: git
  Cc: Junio C Hamano, Taylor Blau, Jeff King, Patrick Steinhardt,
	Karthik Nayak, brian m. carlson,
	Ævar Arnfjörð Bjarmason

Packfile URI downloads currently stage a pack at
objects/pack/pack-<hash>.pack.temp. Two Git processes fetching the same
pack into one object database can append to that file concurrently,
which can corrupt the temporary pack or cause a resume request at EOF.

The first patch gives each direct packfile URI download a private
temporary file. Ordinary dumb HTTP pack requests retain their existing
resumable staging behavior. A later packfile URI retry starts a new
download.

The second patch handles the related .keep race. When another process
has already created the keep file, index-pack reports "pack<TAB><hash>"
instead of "keep<TAB><hash>". Accept both successful forms and remove
only keep files created by the current process.

Each patch adds a regression test for its respective race.

Ted Nyman (2):
  http: use unique tempfiles for packfile URI downloads
  fetch-pack: accept "pack" output for packfile URIs

 Documentation/git-http-fetch.adoc |  5 +-
 fetch-pack.c                      | 36 ++++++++-------
 http.c                            | 77 +++++++++++++++++++++----------
 http.h                            |  1 +
 t/t5550-http-fetch-dumb.sh        | 72 ++++++++++++++++++++++++++++-
 t/t5702-protocol-v2.sh            | 31 +++++++++++++
 6 files changed, 177 insertions(+), 45 deletions(-)


base-commit: e9019fcafe0040228b8631c30f97ae1adb61bcdc
-- 
2.55.0

^ permalink raw reply	[flat|nested] 8+ messages in thread
* [PATCH 0/2] packfile URIs: support concurrent downloads
@ 2026-07-13 22:37 Ted Nyman
  0 siblings, 0 replies; 8+ messages in thread
From: Ted Nyman @ 2026-07-13 22:37 UTC (permalink / raw)
  To: git
  Cc: Junio C Hamano, Taylor Blau, Jeff King, Patrick Steinhardt,
	Karthik Nayak, brian m. carlson,
	Ævar Arnfjörð Bjarmason

Packfile URI downloads currently stage a pack at
objects/pack/pack-<hash>.pack.temp. Two Git processes fetching the same
pack into one object database can append to that file concurrently,
which can corrupt the temporary pack or cause a resume request at EOF.

The first patch gives each direct packfile URI download a private
temporary file. Ordinary dumb HTTP pack requests retain their existing
resumable staging behavior. A later packfile URI retry starts a new
download.

The second patch handles the related .keep race. When another process
has already created the keep file, index-pack reports "pack<TAB><hash>"
instead of "keep<TAB><hash>". Accept both successful forms and remove
only keep files created by the current process.

Each patch adds a regression test for its respective race.

Ted Nyman (2):
  http: use unique tempfiles for packfile URI downloads
  fetch-pack: accept "pack" output for packfile URIs

 Documentation/git-http-fetch.adoc |  5 +-
 fetch-pack.c                      | 36 ++++++++-------
 http.c                            | 77 +++++++++++++++++++++----------
 http.h                            |  1 +
 t/t5550-http-fetch-dumb.sh        | 72 ++++++++++++++++++++++++++++-
 t/t5702-protocol-v2.sh            | 31 +++++++++++++
 6 files changed, 177 insertions(+), 45 deletions(-)


base-commit: e9019fcafe0040228b8631c30f97ae1adb61bcdc
-- 
2.55.0

^ permalink raw reply	[flat|nested] 8+ messages in thread
* [PATCH 0/2] packfile URIs: support concurrent downloads
@ 2026-07-13 22:37 Ted Nyman
  2026-07-14  4:13 ` Taylor Blau
  0 siblings, 1 reply; 8+ messages in thread
From: Ted Nyman @ 2026-07-13 22:37 UTC (permalink / raw)
  To: git
  Cc: Junio C Hamano, Taylor Blau, Jeff King, Patrick Steinhardt,
	Karthik Nayak, brian m. carlson,
	Ævar Arnfjörð Bjarmason

Packfile URI downloads currently stage a pack at
objects/pack/pack-<hash>.pack.temp. Two Git processes fetching the same
pack into one object database can append to that file concurrently,
which can corrupt the temporary pack or cause a resume request at EOF.

The first patch gives each direct packfile URI download a private
temporary file. Ordinary dumb HTTP pack requests retain their existing
resumable staging behavior. A later packfile URI retry starts a new
download.

The second patch handles the related .keep race. When another process
has already created the keep file, index-pack reports "pack<TAB><hash>"
instead of "keep<TAB><hash>". Accept both successful forms and remove
only keep files created by the current process.

Each patch adds a regression test for its respective race.

Ted Nyman (2):
  http: use unique tempfiles for packfile URI downloads
  fetch-pack: accept "pack" output for packfile URIs

 Documentation/git-http-fetch.adoc |  5 +-
 fetch-pack.c                      | 36 ++++++++-------
 http.c                            | 77 +++++++++++++++++++++----------
 http.h                            |  1 +
 t/t5550-http-fetch-dumb.sh        | 72 ++++++++++++++++++++++++++++-
 t/t5702-protocol-v2.sh            | 31 +++++++++++++
 6 files changed, 177 insertions(+), 45 deletions(-)


base-commit: e9019fcafe0040228b8631c30f97ae1adb61bcdc
-- 
2.55.0

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2026-07-14  7:31 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-13 22:34 [PATCH 0/2] packfile URIs: support concurrent downloads Ted Nyman
2026-07-13 22:48 ` Junio C Hamano
2026-07-13 22:55   ` Ted Nyman
2026-07-14  2:42     ` Taylor Blau
2026-07-14  7:31       ` Jeff King
  -- strict thread matches above, loose matches on Subject: below --
2026-07-13 22:37 Ted Nyman
2026-07-13 22:37 Ted Nyman
2026-07-14  4:13 ` Taylor Blau

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.