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

Re: [PATCH v2 1/3] index-pack: add --unpack-limit to unpack objects

From
Duy Nguyen <pclouds@gmail.com>
Date
Sep 8, 2013, 06:28 UTC
Message-ID
<CACsJy8DeJnwJ2hxbKs+ks3Rp6h+uedFA+qt8JTTwyen8sF7XMw@mail.gmail.com>
In-Reply-To
<20130908044417.GD14019@sigill.intra.peff.net>
On Sun, Sep 8, 2013 at 11:44 AM, Jeff King <peff@peff.net> wrote:
Show 16 quoted lines
> On Fri, Sep 06, 2013 at 07:46:01AM +0700, Nguyen Thai Ngoc Duy wrote:
>
>> ---
>>  I had something that could unpack without writing to temp pack file
>>  but I scraped it and chose this way because it follows closely how
>>  index-pack works. It's a good thing imo because .pack v4 is coming
>>  and I don't know how v4 may impact this unpack code path. Once things
>>  are settled, we can revisit and open a separate code path if it's
>>  still a good idea.
>
> From a cursory read, this seems fine. If it were done in complete
> isolation, I'd say it was a slight regression, just because we are doing
> more I/O for the unpack case, and it is not really saving us any code
> (it is not like we can throw away unpack-objects, as I think we would
> want to keep it as a last resort for getting data out of malformed or
> otherwise non-indexable packs).

I can see unpack-objects is more tolerable on corrupt/incomplete packs. If index-pack finds something wrong, it aborts the whole process. I think we can make index-pack stop at the first bad object, adjust nr_objects, and try to recover as much as possible out of the good part. Any other reasons to keep unpack-objects (because I still want to kill it)?

Show 5 quoted lines
> But I can also see it making pack v4 handling easier. So it would make
> sense to me to put it at the start of a series adding pack v4 indexing.
> By the end of the series you would be able to see the benefits of the
> reduced code complexity. Until then, it is a "probably this will help
> later" change.
Agreed.
-- 
Duy
Previous: Jeff KingNext: Jeff King
Message 11 of 12 in “{fetch,receive}-pack: drop unpack-objects, delay loosing objects until the end”
  1. {fetch,receive}-pack: drop unpack-objects, delay loosing objects until the endNguyễn Thái Ngọc Duy, Sep 2, 2013
  2. Eric SunshineSep 2, 2013
  3. Jeff KingSep 3, 2013
  4. Duy NguyenSep 3, 2013
  5. Jeff KingSep 3, 2013
  6. 1/3 index-pack: add --unpack-limit to unpack objectsNguyễn Thái Ngọc Duy, Sep 6, 2013
  7. 2/3 fetch-pack: use index-pack --unpack-limit instead of unpack-objectsNguyễn Thái Ngọc Duy, Sep 6, 2013
  8. Jeff KingSep 8, 2013
  9. 3/3 receive-pack: use index-pack --unpack-limit instead of unpack-objectsNguyễn Thái Ngọc Duy, Sep 6, 2013
  10. Jeff KingSep 8, 2013
  11. Duy NguyenSep 8, 2013
  12. Jeff KingSep 8, 2013

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.