mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 08:47:12 +03:00
db3dbff5d3
Summary: On setup SCS initializes the repos concurrently, warming up derived data for each repo, warming bookmark cache and fetching skiplists. Fetching skiplists is an expensive operation and includes two steps: async get a large blob from the Blobstore and then sync deserialization of the blob. While running on the same task as warming the bookmark cache, it takes all CPU and the other futures have to wait and can't process results returned by MySQL queries or connect to the DB. Thus SCS eventually fail to acquire a new connection or to perform a query in a reasonable time and terminates. Spawning skiplists in a separate task helps to unlock the thread where the warm is running. This was first noticed in TW tasks because after the MySQL rollout some of the SCS tasks started to take an hour to start. To debug this and localize the issue, we put debug output to see what exactly blocks the repo initialization and, turned out it, when skiplists fetching started the rest was blocked. Reviewed By: StanislavGlebik Differential Revision: D26128171 fbshipit-source-id: fe9e1882af898950cf16d8e939dc6bc6be56510e |
||
---|---|---|
.. | ||
fs | ||
integration | ||
locale | ||
mononoke | ||
scm | ||
test_support | ||
test-data | ||
.gitignore | ||
Eden.project.toml |