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

Re: git-pull from git.git - no remote ref for pu or next?

From
Linus Torvalds <torvalds@osdl.org>
Date
Dec 12, 2006, 17:56 UTC
Message-ID
<Pine.LNX.4.64.0612120949230.3535@woody.osdl.org>
In-Reply-To
<86y7pd6oz7.fsf@blue.stonehenge.com>
On Tue, 12 Dec 2006, Randal L. Schwartz wrote:
Show 19 quoted lines
> >>>>> "Randal" == Randal L Schwartz <merlyn@stonehenge.com> writes:
> 
> Randal> I just got this on this morning's git-fetch:
> 
> Randal>     error: no such remote ref refs/heads/pu
> Randal>     error: no such remote ref refs/heads/next
> Randal>     Fetch failure: git://git.kernel.org/pub/scm/git/git.git
> 
> Randal> Here's my remotes/origin:
> 
> Randal>     URL: git://git.kernel.org/pub/scm/git/git.git
> Randal>     Pull: master:origin
> Randal>     Pull: man:man
> Randal>     Pull: html:html
> Randal>     Pull: +pu:pu
> Randal>     Pull: +next:next
> 
> And then it mysteriously fixed itself a few minutes later.
> Is there some sort of publishing failure, or intermittent race condition?
It's mirroring.

The way that kernel.org works is that there is one master site, which is not actually running any public services at all. That's the one that people who have write access can ssh into, and rather than run any public services, it runs the security-conscious things, like the secure logins and the automated signing scripts.

The actual _public_ sites are just mirrors, with just rsync between the things. All to keep the services on the master site minimal.

But because the public sites just mirror using rsync, and aren't really aware of git repositories etc at that stage, what can happen is that a mirroring is on-going when Junio does a push, and then the changes to the "refs/" directory might get rsync'ed before the "object/" directory does, and you end up with the public sites having references to objects that don't even _exist_ on those public sites any more.

When they then run git-daemon, git-deamon will basically see a corrupt git archive, and not expose those "broken" refs at all. Which explains what you see.

And once the mirroring completes, the issue just goes away, which explains why it just magically works five minutes later.

If the public sites used git itself to synchronize git repositories, they'd never see anything like this (because git itself will only write the new refs after it has actually updated the data). But since the thing needs mirroring for non-git uses too, and since rsync generally _works_ apart from the slight race-condition issue, that's what it just uses.

Previous: Randal L. SchwartzNext: Johannes Schindelin
Message 5 of 22 in “git-pull from git.git - no remote ref for pu or next?”
  1. Randal L. SchwartzDec 12, 2006
  2. Randal L. SchwartzDec 12, 2006
  3. Johannes SchindelinDec 12, 2006
  4. Randal L. SchwartzDec 12, 2006
  5. Linus TorvaldsDec 12, 2006
  6. Johannes SchindelinDec 12, 2006
  7. Linus TorvaldsDec 12, 2006
  8. Nicolas PitreDec 12, 2006
  9. Linus TorvaldsDec 12, 2006
  10. Jakub NarebskiDec 12, 2006
  11. Nicolas PitreDec 12, 2006
  12. Johannes SchindelinDec 12, 2006
  13. Jakub NarebskiDec 12, 2006
  14. Nicolas PitreDec 12, 2006
  15. Johannes SchindelinDec 12, 2006
  16. Linus TorvaldsDec 12, 2006
  17. Jakub NarebskiDec 12, 2006
  18. Johannes SchindelinDec 12, 2006
  19. Nicolas PitreDec 12, 2006
  20. Nicolas PitreDec 12, 2006
  21. Linus TorvaldsDec 12, 2006
  22. Eric WongDec 12, 2006

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.