Re: [PATCH v2 0/7] odb: add write operation to ODB transaction interface
- From
Patrick Steinhardt <ps@pks.im>
- Date
- Apr 1, 2026, 11:24 UTC
- Message-ID
- <ac0AcARmeRamQ4Cy@pks.im>
- In-Reply-To
- <20260401030316.1847362-1-jltobler@gmail.com>
On Tue, Mar 31, 2026 at 10:03:08PM -0500, Justin Tobler wrote:
Show 27 quoted lines
> Greetings, > > This series lays the groundwork for introducing write operations to the > ODB transaction interface. The eventual goal is for all object writes > performed within a transaction to go through this interface explicitly, > rather than implicitly relying on the transaction to reconfigure ODB > sources so that writes are redirected to a temporary location. > > For now, only `odb_transaction_write_object_stream()` is implemented and > wires up the existing logic for streaming "large" blobs directly into a > packfile as part of the transaction. > > Most of the patches are structural refactorings to enable this, but > patch 4 introduces a behavioral change in how packfiles that would > exceed "pack.packSizeLimit" are handled. > > Changes since V1: > - Fixed some typos > - Improved error handling > - Removed unnecessary guard statement > - Documented in comments why inflated object size is used to approximate > if object write will exceed "pack.packSizeLimit". > - Updated `struct odb_write_stream` read() callback to support returning > errors and using caller provided buffer > - Updated the `hash_blob_stream()` function signature to operate on a > `struct odb_write_stream` instead of an fd directly > - Renamed some variables/functions for better clarity
Thanks. I've had some smaller nits, but overall I'm happy with this state.
Patrick