sapling/eden/fs/store/hg
Adam Simpkins d752d72fc8 add some additional verification when importing empty files
Summary:
We have seen issues with Eden occasionally getting empty file contents back
from Mercurial.  We have not been able to reproduce this issue directly
yet--the overall incidence rate relative to the number of users is fairly
small, but the problem is pretty problematic when it does occur.

This updates the hg_import_helper.py script to perform additional checking
when it finds a file that is empty.

Empty files that have never been modified or renamed all have the same file
revlog hash.  If the rev hash in question is this known hash, we know that the
file is in fact empty.  Otherwise, if remotefilelog is in use we check the
remotefilelog metadata to confirm the size, and we log an error if it is
non-zero.  We then try re-opening the repository and re-importing the file.

These additional checks and log messages should hopefully help narrow down the
problem the next time we see a report of the issue.  This should help us
identify if the remotefilelog metadata has the correct file size or not.

Reviewed By: wez

Differential Revision: D9260788

fbshipit-source-id: 29615b32632946cd319aa837bec3c68b757d3ee0
2018-08-10 11:38:20 -07:00
..
test Rename UnboundedQueueThreadPool to UnboundedQueueExecutor and add a ManualExecutor variant 2018-08-03 13:21:59 -07:00
CMakeLists.txt add CMake build files 2018-04-30 14:37:46 -07:00
hg_import_helper.py add some additional verification when importing empty files 2018-08-10 11:38:20 -07:00
HgBackingStore.cpp Rename UnboundedQueueThreadPool to UnboundedQueueExecutor and add a ManualExecutor variant 2018-08-03 13:21:59 -07:00
HgBackingStore.h Rename UnboundedQueueThreadPool to UnboundedQueueExecutor and add a ManualExecutor variant 2018-08-03 13:21:59 -07:00
HgImporter.cpp Use MononokeBackingStore when fetching trees 2018-08-07 13:52:29 -07:00
HgImporter.h Use MononokeBackingStore when fetching trees 2018-08-07 13:52:29 -07:00
HgImportPyError.cpp include the exception type name in hg_import_helper.py errors 2017-11-15 13:31:58 -08:00
HgImportPyError.h include the exception type name in hg_import_helper.py errors 2017-11-15 13:31:58 -08:00
HgManifestImporter.cpp move folly/experimental/logging to folly/logging/ 2018-04-30 21:29:29 -07:00
HgManifestImporter.h split RocksDbLocalStore out from LocalStore 2018-02-07 11:54:16 -08:00
HgProxyHash.cpp move HgProxyHash to its own top-level file 2018-06-14 22:02:38 -07:00
HgProxyHash.h move HgProxyHash to its own top-level file 2018-06-14 22:02:38 -07:00
tester.cpp make LocalStore::getTree return a Future 2018-05-31 21:19:40 -07:00