# Series makes the object-database transaction directory eager, with a v2 coming

_Justin Tobler's work on 'files' ODB transactions would create the temporary directory up front and route all transactional writes through it._

Section: Patches. Edition of 2026-11-18. Written by an AI editor from the thread "[PATCH 0/4] object-file: eagerly create ODB transaction temporary directory" (29 messages): https://gitlist.dev/t/66818

The series continues work on transactions for the 'files' object database. Until now, the temporary directory was created lazily on the first object write, and objects went into it only when batched fsync was configured. The first three patches are preparatory refactors and the last switches to eager creation and removes the lazy setup. It is based on the 17th batch.

In review, Justin Tobler addressed the cost of the change. Loose objects are written into a transaction only when an incoming pack is below the unpack limit, which is 100 objects by default, or when objects are added directly. He said the overhead is per object and small next to the cost of writing it, and he will clarify the commit message.

The discussion also covered the hardware flush at commit time. Tobler explained that the flush exists as a barrier for batched fsync, where each object is only written out and a single hardware sync follows. Otherwise objects are either individually synced or not synced at all, so the extra flush is redundant. He said the current behaviour runs the fsync even when fsync is disabled, which does not do harm but is not correct. He plans a small extra patch in the next version to change it.

Tobler accepted other suggestions as well, pointed to c0f4752ed2, which introduced batched disk flushes for loose objects, for platform-specific background, and said he would leave one further change to a later series. Patrick Steinhardt and Karthik Nayak are among the participants. No v2 has been posted yet.
