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

Re: [RFC/PATCH] read-cache: write all indexes with the same permissions

From
Duy Nguyen <pclouds@gmail.com>
Date
Nov 13, 2018, 16:55 UTC
Message-ID
<CACsJy8CaAC0UP+VxYU7zbdQc6DtKYa-FzOnbpNf+_P2L3zfUvQ@mail.gmail.com>
In-Reply-To
<20181113153235.25402-1-avarab@gmail.com>

On Tue, Nov 13, 2018 at 4:32 PM Ævar Arnfjörð Bjarmason <avarab@gmail.com> wrote:

> I won't have time to finish this today, as noted in
> https://public-inbox.org/git/874lcl2e9t.fsf@evledraar.gmail.com/
> there's a pretty major bug here in that we're now writing out literal
> sharedindex_XXXXXX files.

It's not the end of the world because create_tempfile opens with O_EXCL so if two processes try to create it at the same time, one will fail, but no corruption or such.

Show 9 quoted lines
> Obviously that needs to be fixed, and the fix is trivial, I can use
> another one of the mks_*() functions with the same mode we use to
> create the index.
>
> But we really ought to have tests for the bug this patch introduces,
> and as noted in the E-Mail linked above we don't.
>
> So hopefully Duy or someone with more knowledge of the split index
> will chime in to say what's missing there...

I don't have any bright idea how to catch the literal _XXXXX file. It's a temporary file and will not last long enough for us to verify unless we intercept open() calls with LD_PRELOAD.

-- 
Duy
Previous: Ævar Arnfjörð BjarmasonNext: Ævar Arnfjörð Bjarmason
Message 16 of 22 in “read-cache: use shared perms when writing shared index”
  1. 1/3 read-cache: use shared perms when writing shared indexChristian Couder, Jun 22, 2017
  2. 2/3 t1301: move movebits() to test-lib-functions.shChristian Couder, Jun 22, 2017
  3. Junio C HamanoJun 22, 2017
  4. Ramsay JonesJun 22, 2017
  5. Junio C HamanoJun 23, 2017
  6. Christian CouderJun 23, 2017
  7. 3/3 t1700: make sure split-index respects core.sharedrepositoryChristian Couder, Jun 22, 2017
  8. Junio C HamanoJun 22, 2017
  9. Christian CouderJun 22, 2017
  10. Junio C HamanoJun 22, 2017
  11. Christian CouderJun 22, 2017
  12. Junio C HamanoJun 22, 2017
  13. Christian CouderJun 23, 2017
  14. Ævar Arnfjörð BjarmasonNov 13, 2018
  15. read-cache: write all indexes with the same permissionsÆvar Arnfjörð Bjarmason, Nov 13, 2018
  16. Duy NguyenNov 13, 2018
  17. Ævar Arnfjörð BjarmasonNov 13, 2018
  18. Christian CouderNov 16, 2018
  19. SZEDER GáborNov 16, 2018
  20. Duy NguyenNov 16, 2018
  21. Christian CouderNov 17, 2018
  22. SZEDER GáborNov 17, 2018

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.