Git development
 help / color / mirror / Atom feed
* [PATCH 0/2] object-file: fix packfile flush during transaction commit
@ 2026-09-13 20:26 Justin Tobler
  2026-09-13 20:26 ` [PATCH 1/2] object-file: lift ODB reprepare out of packfile flush Justin Tobler
                   ` (2 more replies)
  0 siblings, 3 replies; 18+ messages in thread
From: Justin Tobler @ 2026-09-13 20:26 UTC (permalink / raw)
  To: git; +Cc: ps, Justin Tobler

Greetings,

This short series fixes a bug I found related to committing an ODB
transaction that contains both a loose object and "large" blob when also
configured to batch fsync loose objects. The issue can be reproduced
with the following:

	git init
	git config core.fsync loose-object
	git config core.fsyncMethod batch
	git config core.bigFileThreshold 5
	echo foo >1-foo && echo foobar >2-foobar
	git add 1-foo 2-foobar

and produces the following error:

	error: unable to write file .git/objects/pack/pack-2b7c2470289822070687e8d64186093a710eaed3.pack: No such file or directory
	fatal: unable to rename temporary file to '.git/objects/pack/pack-2b7c2470289822070687e8d64186093a710eaed3.pack'

If a "large" blob packfile is written to the transaction temporary
directory, it is unable to be flushed during transaction commit because
the underlying transaction is migrated to the main ODB before the
packfile is finalized. To avoid this, this series ensures any pending
packfile in the transaction is flushed first.

Thanks,
-Justin

Justin Tobler (2):
  object-file: lift ODB reprepare out of packfile flush
  object-file: flush transaction packfile before migrating objects

 object-file.c    | 12 ++++++++----
 t/t1050-large.sh | 16 ++++++++++++++++
 2 files changed, 24 insertions(+), 4 deletions(-)


base-commit: 47ce80527c56f462cb97db4ca8125342204d3783
-- 
2.55.0


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

end of thread, other threads:[~2026-09-24  6:13 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-13 20:26 [PATCH 0/2] object-file: fix packfile flush during transaction commit Justin Tobler
2026-09-13 20:26 ` [PATCH 1/2] object-file: lift ODB reprepare out of packfile flush Justin Tobler
2026-09-15  4:40   ` Karthik Nayak
2026-09-15  8:54     ` Justin Tobler
2026-09-23 13:16   ` Patrick Steinhardt
2026-09-23 21:04     ` Justin Tobler
2026-09-24  5:58       ` Patrick Steinhardt
2026-09-24  6:00         ` Patrick Steinhardt
2026-09-13 20:26 ` [PATCH 2/2] object-file: flush transaction packfile before migrating objects Justin Tobler
2026-09-15  4:46   ` Karthik Nayak
2026-09-15  8:59     ` Justin Tobler
2026-09-23 13:16   ` Patrick Steinhardt
2026-09-23 21:17     ` Justin Tobler
2026-09-23 22:03 ` [PATCH v2 0/2] object-file: fix packfile flush during transaction commit Justin Tobler
2026-09-23 22:03   ` [PATCH v2 1/2] object-file: lift ODB reprepare out of packfile flush Justin Tobler
2026-09-24  6:13     ` Patrick Steinhardt
2026-09-23 22:03   ` [PATCH v2 2/2] object-file: flush transaction packfile before migrating objects Justin Tobler
2026-09-24  6:01   ` [PATCH v2 0/2] object-file: fix packfile flush during transaction commit Patrick Steinhardt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox