Mercurial repositories: hg verify warnings/integrity errors

Thomas De Schampheleire patrickdepinguin at gmail.com
Sat Feb 3 21:10:46 UTC 2018


Dominik, Mads,

2018-02-03 20:10 GMT+01:00 Mads Kiilerich <mads at kiilerich.com>:
>
> On 01/30/2018 12:12 PM, Thomas De Schampheleire wrote:
>>
>> Hello,
>>
>> When I run 'hg verify' in several of our Mercurial repositories
>> managed by Kallithea, I see on many repositories the following type of
>> warnings popping up for several files:
>>
>>   warning: revlog 'data/tools/fit_common.h.i' not in fncache!
>>
>> For all practical purposes these repositories seem to behave fine.
>> Is it possible that this message is triggered by the way Kallithea is
>> handling the Mercurial repositories, possible not updating the fncache
>> or something?
>
>
> Hi
>
> I can't imagine Kallithea itself can have caused that.
>
> It sounds more like the usual Mercurial append-only / locking protocol has
> been violated. Perhaps by rsync running while writing to the repository. Or
> perhaps by Kallithea holding on to a cached repo object while the underlying
> file system content was changed without invalidating the cache.
>
> /Mads
>
>

Thanks both for your feedback.

Some further analysis showed that the backup I had also showed the
same corruptions. These backups are normally made using 'hg pull', but
the initial backup with 'hg clone'.
Tests showed that 'hg pull' will not pull along any inconsistencies in
the repository (as one would expect) but 'hg clone' will happily clone
the corruptions along to the destination (unless when using 'hg clone
--pull'). This observation thus means that the corruptions must have
been present from the beginning, since they could only have been
replicated to the backup location via the initial clone.

I have proceeded with fixing all corruptions (cloning from yet another
backup, then pulling from the corrupt one) and adapting my backup
script to run 'hg verify' before making any backup.
Until now, all repositories remain intact.
I thus have good hopes that something went wrong during the rsync or
some other action I did when setting up the server.

Best regards,
Thomas


More information about the kallithea-general mailing list