Re: [PATCH v2 3/5] odb/source: let callers discern missing and corrupt objects

Karthik Nayak <[email protected]>
Newsgroups org.kernel.vger.git
Message-ID <CAOLa=ZRPudL38f9wTZoRNXLPeEpX5OSC_kaQyG1xgyNNriruMQ@mail.gmail.com>
Patrick Steinhardt <[email protected]> writes:

> On Thu, Aug 20, 2026 at 05:09:51PM -0400, Karthik Nayak wrote:
>> Patrick Steinhardt <[email protected]> writes:
>> > On Thu, Aug 20, 2026 at 08:56:50AM -0400, Karthik Nayak wrote:
>> Oops. Thanks for the detailed response.
>>
>> I think I made my case in reverse, but my original argument still
>> holds.
>>
>> ret_packed   ret_loose    ret_packed != NOT_FOUND ?   returned
>> -----------  -----------  ---------------------------  -----------------
>> NOT_FOUND    NOT_FOUND    false                        ret_loose (NOT_FOUND)
>> NOT_FOUND    ERROR        false                        ret_loose  (ERROR)
>> ERROR        NOT_FOUND    true                         ret_packed (ERROR)
>> ERROR        ERROR        true                         ret_packed (ERROR)
>>
>> So since we return ret_loose as many times as ret_packed. The comment:
>>
>> > and prefer the error of the packed source in case both reads have
>> > failed.
>>
>> isn't true entirely. So isn't it better modified to something like
>> "prefer other errors over not found errors" or something. I hope that
>> makes sense?
>
> But we don't. As your above table shows, we return errors twice from the
> packed backend and only once from the loose backend. And in case both
> sources returned an error, we prefer the packed one.
>
> I think where we're talking past one another is that I distinguish
> between errors (-1) and NOT_FOUND.
>
> Patrick

Yeah I figured, plus this isn't significant. Thanks for humoring me :)
signature.asc (application/pgp-signature, 690 B)
-----BEGIN PGP SIGNATURE-----

iQHKBAEBCgA0FiEEV85Mf2N1cQ/LZcYGPtWfJI5GjH8FAmqIRxgWHGthcnRoaWsu
MTg4QGdtYWlsLmNvbQAKCRA+1Z8kjkaMf7hcDACgg1ubRJsAQL/HpsumpM8Dbeaq
p9n0Dm3j/WWOv2CmOsVbJSXsCp6MbCRUpLcIdTG3gADWcHUaDRvM3uAUEVSO9kU7
ehI6jl2Rca8u4wcE3oFURn+2aCU9cV/5Wr83AY/BmoYFoAv90wytbwIrNPqKgC0M
+dbdmPuUG4ZU9Ynsl+/qoLtZ1DE23oPgK2qkgzAV/mNIDkZx6MF5KHyQ3YNX20/z
bGaiZJHAQbbRfeoMKTIWK00owZMiikchg8wS47ozmNF0t5fR2dEIgtZnyun7R1pQ
RmWD/IeP/wwn4Bsnik06REY4nHNPXYksfHZPZ+iUR6NeJhKrUhUpKGFxhcE6aIkP
07sYU0C9SrsjkWGDw023uhwnwbcjNFiIZ4AwBGGwGGTQjlqiZYldLZsMF/wwkChJ
qpMwU4CdvtSK5dMJ36EomHj7MJcmdEY2beRj7Ii25Ra/9FXPVPzE2mqyMlrJ+40L
629fwuOX6k404u/4R5+/gWTZH5ZH4Ua3PDuCj/Q=
=gfbC
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.