Thread (89 messages) 89 messages, 3 authors, 1d ago

Re: [PATCH v2 05/11] object-file: propagate files transaction errors

From: Justin Tobler <hidden>
Date: 2026-07-08 16:21:52

On 26/07/08 08:41AM, Patrick Steinhardt wrote:
On Tue, Jul 07, 2026 at 11:14:06PM -0500, Justin Tobler wrote:
quoted
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.
quoted
@@ -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.
Ya, printing some error messages seems like a good idea here. Will do so
in the next version.

-Justin
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help