mirror of
https://github.com/facebook/sapling.git
synced 2024-10-11 01:07:15 +03:00
43ac2a1c62
Summary: This is the (almost) final diff to introduce WarmBookmarksCache in repo_client. A lot of this code is to pass through the config value, but a few things I'd like to point out: 1) Warm bookmark cache is enabled from config, but it can be killswitched using a tunable. 2) WarmBookmarksCache in scs derives all derived data, but for repo_client I decided to derive just hg changeset. The main motivation is to not change the current behaviour, and to make mononoke server more resilient to failures in other derived data types. 3) Note that WarmBookmarksCache doesn't obsolete SessionBookmarksCache that was introduced earlier, but rather it complements it. If WarmBookmarksCache is enabled, then SessionBookmarksCache reads the bookmarks from it and not from db. 4) There's one exception in point #3 - if we just did a push then we read bookmarks from db rather than from bookmarks cache (see update_publishing_bookmarks_after_push() method). This is done intentionally - after push is finished we want to return the latest updated bookmarks to the client (because the client has just moved a bookmark after all!). I'd argue that the current code is a bit sketchy already - it doesn't read from master but from replica, which means we could still see outdated bookmarks. Reviewed By: krallin Differential Revision: D22820879 fbshipit-source-id: 64a0aa0311edf17ad4cb548993d1d841aa320958 |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |