Re: [PATCH v2 05/11] object-file: propagate files transaction errors
- From
Patrick Steinhardt <ps@pks.im>
- Date
- Jul 8, 2026, 06:41 UTC
- Message-ID
- <ak3xHiOQfNxqFR58@pks.im>
- In-Reply-To
- <20260708041412.1157499-6-jltobler@gmail.com>
On Tue, Jul 07, 2026 at 11:14:06PM -0500, Justin Tobler wrote:
Show 16 quoted lines
> diff --git a/object-file.c b/object-file.c > index e51389833a..64cb874fe7 100644 > --- a/object-file.c > +++ b/object-file.c > @@ -511,11 +511,15 @@ static void odb_transaction_files_prepare(struct odb_transaction *base) > * added at the time they call odb_transaction_files_begin. > */ > if (!transaction || transaction->objdir) > - return; > + return 0; > > transaction->objdir = tmp_objdir_create(base->source->odb->repo, "bulk-fsync"); > - if (transaction->objdir) > - tmp_objdir_replace_primary_odb(transaction->objdir, 0); > + if (!transaction->objdir) > + return -1;
As far as I can see we don't report any errors as part of `tmp_objdir_create()`, so we should probably print an error here.
Show 8 quoted lines
> @@ -1668,14 +1672,19 @@ static void odb_transaction_files_commit(struct odb_transaction *base) > * Make the object files visible in the primary ODB after their data is > * fully durable. > */ > - tmp_objdir_migrate(transaction->objdir); > + if (tmp_objdir_migrate(transaction->objdir)) > + return -1; > +
Likewise.
Patrick