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

Re: auto packing with simultaneous pushes: "error: Could not stat 'objects/[…]/[…]'"

From
IVIvan D Vasin <nisavid@gmail.com>
Date
Jan 24, 2013, 01:39 UTC
Message-ID
<CADcu=0jiEEOkWZXshLdMmOBYJt=SzHfJ39r_qo8GzjdY6BTRaA@mail.gmail.com>
In-Reply-To
<7vbocffmpn.fsf@alter.siamese.dyndns.org>
On Wed, Jan 23, 2013 at 7:28 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 10 quoted lines
> Ivan D Vasin <nisavid@gmail.com> writes:
>
>> my suggestion is that an auto pack should lock the repository,
>> preventing at least other auto packs (and perhaps other operations)
>> ...
>>
>> ``git fsck`` is successful on both of our repos and on the bare repo
>> to which we pushed.
>
> Successful after you pushed, or before you pushed, or both?
both
Show 9 quoted lines
>
> I suspect both.
>
> I do not think such a lock is necessary for correctness of the
> operation, but running two auto packing sumultaneously is wasteful,
> so it would help performance.  But that would produce a larger
> problem.  What if your modified auto-packer takes a lock and then
> dies without relinquishing the lock?  The repository will never be
> repacked after such an event forever?

perhaps the lock could contain the PID of the auto pack process. if that PID has gone away, the lock is ignored and replaced with a new one.

that's what comes to my mind. of course, there could be other ways to handle this that i'm not thinking of.

in any case, the error messages, though spurious, are alarming to the uninformed user. it looks like Git is saying that there is actual data loss, where in fact there is none. if Git doesn't prevent these messages from appearing (via locking behavior or otherwise), then it should at least annotate them with a message that describes their possibly spurious nature and perhaps instructs the user to verify everything with ``git fsck``.

Previous: Ivan D Vasin
Message 2 of 2 in “auto packing with simultaneous pushes: "error: Could not stat 'objects/[…]/[…]'"”
  1. Ivan D VasinJan 23, 2013
  2. Ivan D VasinJan 24, 2013

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.