Re: [PATCH v2 06/11] reftable/writer: refactorings for `writer_add_record()`

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Apr 4, 2024 at 7:48 AM Patrick Steinhardt <ps@xxxxxx> wrote:
> +       /*
> +        * Try to add the record to the writer again. If this still fails then
> +        * the record does not fit into the block size.
> +        *
> +        * TODO: it would be great to have `block_writer_add()` return proper
> +        *       error codes so that we don't have to second-guess the failure
> +        *       mode here.
> +        */

The Go code returns a (size, boolean) tuple for the write routines
here, but that does not really work in the Git C style.

If you make the routines return error codes it suggests that the
in-memory write can fail for other reasons beyond "does not fit". Not
sure if that is really an improvement.

-- 
Han-Wen Nienhuys - hanwenn@xxxxxxxxx - http://www.xs4all.nl/~hanwen





[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux