git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Karthik Nayak <karthik.188@gmail.com>
Date
Aug 21, 2026, 12:39 UTC
Message-ID
<CAOLa=ZRPudL38f9wTZoRNXLPeEpX5OSC_kaQyG1xgyNNriruMQ@mail.gmail.com>
In-Reply-To
<aofl8e4P6BqJaQEm@pks.im>
Patrick Steinhardt <ps@pks.im> writes:
Show 32 quoted lines
> On Thu, Aug 20, 2026 at 05:09:51PM -0400, Karthik Nayak wrote:
>> Patrick Steinhardt <ps@pks.im> 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 :)
Previous: Patrick SteinhardtNext: Patrick Steinhardt
Message 12 of 15 in “odb: handle `OBJECT_INFO_DIE_IF_CORRUPT` generically”
  1. 0/5 odb: handle `OBJECT_INFO_DIE_IF_CORRUPT` genericallyPatrick Steinhardt, Aug 19, 2026
  2. 1/5 odb/source-packed: flag known-bad objects as corrupt and not missingPatrick Steinhardt, Aug 19, 2026
  3. 2/5 odb/source: introduce error status when reading objectsPatrick Steinhardt, Aug 19, 2026
  4. Karthik NayakAug 20, 2026
  5. Patrick SteinhardtAug 20, 2026
  6. Karthik NayakAug 20, 2026
  7. 3/5 odb/source: let callers discern missing and corrupt objectsPatrick Steinhardt, Aug 19, 2026
  8. Karthik NayakAug 20, 2026
  9. Patrick SteinhardtAug 20, 2026
  10. Karthik NayakAug 20, 2026
  11. Patrick SteinhardtAug 21, 2026
  12. Karthik NayakAug 21, 2026
  13. 4/5 odb/source: allow `read_object_info()` to bubble up error messagesPatrick Steinhardt, Aug 19, 2026
  14. 5/5 odb: handle `OBJECT_INFO_DIE_IF_CORRUPT` genericallyPatrick Steinhardt, Aug 19, 2026
  15. Karthik NayakAug 20, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.