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

Re: [PATCH] read-cache: tighten checks for do_read_index

From
Thomas Gummerer <t.gummerer@gmail.com>
Date
Mar 24, 2015, 21:51 UTC
Message-ID
<20150324215104.GB2006@hank>
In-Reply-To
<xmqq384u5be7.fsf@gitster.dls.corp.google.com>
On 03/24, Junio C Hamano wrote:
Show 31 quoted lines
> Thomas Gummerer <t.gummerer@gmail.com> writes:
>
> > 03f15a7 read-cache: fix reading of split index moved the checks for the
> > correct order of index entries out of do_read_index.  This loosens the
> > checks more than necessary.  Re-introduce the checks for the order, but
> > don't error out when we have multiple stage-0 entries in the index.
> > Return a flag for the caller instead, if we have multiple stage-0
> > entries and let the caller decide if we need to error out.
> >
> > Signed-off-by: Thomas Gummerer <t.gummerer@gmail.com>
> > ---
> >
> > This is a patch on top of my previous patch, as that one has already
> > been merged to next.
>
> I am not convinced that this is a good change in the first place.
>
> The original before your fix was wrong exactly because it was too
> tightly tied to the implementation of the index file format where
> there was only one file whose contents must be sorted, and that is
> why it was a broken check in a new world with split-index.  And your
> fix in 'next' is the right fix---it makes the verification happen
> only on the result is given to the caller for its consumption.
>
> It may be true that entries may have to be sorted in a certain order
> when reading the original index file format and also reading some
> steps in reading the split-index, but that merely happens to be an
> imprementation detail of the two format currently supported, and as
> we improve these formats (or even introduce yet another one) in the
> longer term, this patch would re-introduce the same issue your
> earlier fix corrected, wouldn't it?
Yes, after looking at it again I completely agree.  Sorry for the noise.
Previous: Junio C HamanoNext: Thomas Gummerer
Message 16 of 18 in “t1700: make test pass with index-v4”
  1. t1700: make test pass with index-v4Thomas Gummerer, Mar 20, 2015
  2. Junio C HamanoMar 20, 2015
  3. Thomas GummererMar 20, 2015
  4. Junio C HamanoMar 20, 2015
  5. t1700: make test pass with index-v4Thomas Gummerer, Mar 20, 2015
  6. Junio C HamanoMar 20, 2015
  7. Thomas GummererMar 20, 2015
  8. 0/2 fix test suite with split indexThomas Gummerer, Mar 20, 2015
  9. 1/2 test-lib: allow using split index in the test suiteThomas Gummerer, Mar 20, 2015
  10. Junio C HamanoMar 20, 2015
  11. Thomas GummererMar 20, 2015
  12. 2/2 read-cache: fix reading of split indexThomas Gummerer, Mar 20, 2015
  13. Duy NguyenMar 24, 2015
  14. read-cache: tighten checks for do_read_indexThomas Gummerer, Mar 24, 2015
  15. Junio C HamanoMar 24, 2015
  16. Thomas GummererMar 24, 2015
  17. Thomas GummererMar 24, 2015
  18. Junio C HamanoMar 24, 2015

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.