sapling/remotefilelog
Wez Furlong 2ec314e26a remotefilelog: add separate option to validate localcache files
Summary:
We've recently had to dig into two different issues that resulted in broken
files landing in the localcache; one was due to a problem with the data source
for our cacheprocess becoming corrupt and the other was due to a failed write
(ENOSPC) causing a truncated file to be left in the local cache.

It is desirable to perform some lightweight consistency checks before we return
data up to the caller of localcache, but prior to this diff the validation
functionality was coupled to configuring a log file.

Due to the shared nature of the localcache it's not always clear cut where we
want to log localcache consistency issues, so it feels more flexible to
decouple logging from enabling checks.

This diff introduces `remotefilelog.validatecache` as a separate option that
can have three values:

* `off` - no checks are performed
* `on` - checks are performed during read and write
* `strict` - checks are performed during __contains__, read and write

The default is now `on`.

Test Plan: `./run-tests.py --with-hg=../../hg-crew/hg`

Reviewers: #sourcecontrol, ttung

Differential Revision: https://phabricator.fb.com/D2941067

Tasks: 10044183, 9987694
2016-02-18 08:34:33 -08:00
..
__init__.py changegroup: support new _packermap name 2016-01-19 16:34:53 -08:00
cacheclient.py cacheclient: don't forget to specify the port of the memcached server 2015-09-29 07:48:58 +02:00
debugcommands.py remotefilelog: handle the death of repo.sopener (hg change 0bbe3294361a) 2015-06-30 10:12:38 -04:00
fileserverclient.py remotefilelog: add separate option to validate localcache files 2016-02-18 08:34:33 -08:00
remotefilectx.py More robust adjustlinknode code for None srcrev's 2016-02-17 11:01:45 -08:00
remotefilelog.py remotefilelog: Make TortoiseHG work with remotefilelog 2016-02-05 14:53:45 +00:00
remotefilelogserver.py Fix exception when making a directory that already exists 2015-12-10 10:11:27 -08:00
shallowbundle.py remotefilelog: fix compat with core on builddeltaheader 2015-12-30 13:33:47 -08:00
shallowrepo.py Add prefetching to checklookup 2015-12-14 14:44:08 -08:00
shallowstore.py Add more comments explaining various complexities 2013-11-05 17:19:59 -08:00
shallowutil.py [bundle2] insert ourselves into the cg1packer class hierarchy and fix up the packermap 2014-11-07 18:35:52 -08:00
shallowverifier.py remotefilelog: removing filelog check from verification process 2016-01-07 16:57:39 -08:00