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

Re: Repository corruption if objects pushed in the middle of repack

From
Taylor Blau <me@ttaylorr.com>
Date
Jun 13, 2022, 21:18 UTC
Message-ID
<YqepoUMb3rkKgWqB@nand.local>
In-Reply-To
<20220613203145.wbpi2m3ys3hchw6c@meerkat.local>
Hi Konstantin,
On Mon, Jun 13, 2022 at 04:31:45PM -0400, Konstantin Ryabitsev wrote:
Show 5 quoted lines
> As far as I know, the maintenance steps we are running shouldn't result in any
> missing objects, so I'm curious if it's something we're doing wrong (using
> unsafe flags) or if git isn't properly accounting for some objects that come
> in during the repack stage. We're seeing this happen fairly routinely, so it's
> not just a random fluke.

Interesting. From what you described, it does suggest that `repack` is deleting things too eagerly.

But I would be quite surprised if that were the case, since `repack` is *very* careful to only delete packs which it knew about at the start of the repack. Likewise, when it cleans up loose objects, it only unlinks objects which can be found in some (non-deleted) pack that will remain in the repository.

So I doubt that repack is doing something weird here, though it would be extremely interseting if you were able to pause the `repack` process at a specific point, push new objects into the repository, and reliably demonstrate the corruption.

Thanks, Taylor

Previous: Konstantin RyabitsevNext: Taylor Blau
Message 2 of 7 in “Repository corruption if objects pushed in the middle of repack”
  1. Konstantin RyabitsevJun 13, 2022
  2. Taylor BlauJun 13, 2022
  3. Taylor BlauJun 13, 2022
  4. Konstantin RyabitsevJun 13, 2022
  5. Taylor BlauJun 13, 2022
  6. Konstantin RyabitsevJun 13, 2022
  7. Chris TorekJun 13, 2022

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.