mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 08:47:12 +03:00
2ec314e26a
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 |
||
---|---|---|
.. | ||
__init__.py | ||
cacheclient.py | ||
debugcommands.py | ||
fileserverclient.py | ||
remotefilectx.py | ||
remotefilelog.py | ||
remotefilelogserver.py | ||
shallowbundle.py | ||
shallowrepo.py | ||
shallowstore.py | ||
shallowutil.py | ||
shallowverifier.py |