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

Re: What broke snapshots now?

From
Linus Torvalds <torvalds@osdl.org>
Date
Jul 10, 2005, 17:08 UTC
Message-ID
<Pine.LNX.4.58.0507100954080.17536@g5.osdl.org>
In-Reply-To
<1121006378.23706.65.camel@baythorne.infradead.org>
On Sun, 10 Jul 2005, David Woodhouse wrote:
> 
> Now the mailing list feed isn't happy though -- it stopped being able to
> pull from your tree at around 0600 UTC (which I think is then the last
> DRM fix was added). I got this when trying to update...

Which script is this? I'm looking at your scripts, but "cg-feedmaillist.sh" is unreadable for me, so I can't see all of it.

Anyway, it's possible that this is a temporary problem: one of the issues is that since you seem to be using the "rsync:" protocol for updating things, what happens is that if the mirroring is off a bit, you may have gotten a new head, but not all the objects. Then you'd get exactly this.

I don't know how to solve that, really. It's fundamental to any mirroring that doesn't guarantee some kind of ordering, ie the dumb kind.

All the "native git" pack-file synchronization protocols should be strictly ordered, ie they will unpack and write the new objects _before_ they write the new refs that point to them..

But you can just imagine what happens if the mirror script is busy
mirroring at the same time, and has already mirrored the object
directories before we wrote all of them, but then gets to the refs/
directory by the time we have written the new refs (and all the new object
- but it didn't notice that because it had already mirrored the object
dirs). 

See what I'm saying? The thing fixes itself after a while when you try again and the next round of mirroring has gotten the objects it missed the last time, but there fundamentally isn't anything to be done about the fact that the mirroring wasn't "atomic". Only a git-aware mirror could do an atomic snapshot.

I'm actually surprised that people haven't complained more about this than they have. I know it's happened a couple of times: it bit Dave Jones' scripts once, and it's caused webgit to sometimes report "permission denied" problems (or whatever) and then showing empty logs.

The fact that my upload scripts _do_ upload in the right order, together with the fact that rsync normally syncs alphabetically (ie "objects" before "refs") means that we _normally_ don't see this, but it's occasionally unavoidable when I happen to do a new push while a previous mirror sweep is going on.

Of course, in this case it may also be just some cogito thing that doesn't like pack-files. The fact that it complains about an object that is not actually either of the "heads" of the diff makes me suspect it's really a missing object, though, which in turn makes me suspect the above mirror mis-feature.

			Linus
Previous: David WoodhouseNext: David Woodhouse
Message 6 of 9 in “What broke snapshots now?”
  1. David WoodhouseJul 9, 2005
  2. Jeff GarzikJul 9, 2005
  3. Linus TorvaldsJul 9, 2005
  4. David WoodhouseJul 9, 2005
  5. David WoodhouseJul 10, 2005
  6. Linus TorvaldsJul 10, 2005
  7. David WoodhouseJul 10, 2005
  8. Linus TorvaldsJul 10, 2005
  9. David WoodhouseJul 11, 2005

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.