mirror of
https://github.com/facebook/sapling.git
synced 2024-10-11 01:07:15 +03:00
0d27cac271
Summary: cross repo bookmark validation alarm fired a few times, and looks like it fired because of the following: 1) find_bookmark_diff compared boomarks and found an inconsistency for bookmark BM which points to commit A in large repo. Next step is to check bookmark history 2) While find_bookmark_diff was running a new commit B was landed in a large repo and was backsynced to the small repo, so BM now points to commit B. 3) check_large_bookmark_history is called and it fetches latest bookmark log entries, and it gets entries for commit A and commit B. check_large_bookmark_history checks if any of the fetched entries points to a commit in the small repo and if yes then it also checks if this bookmark update happened not so long ago. And the problem is in the way it checks the "not so long ago" part. It does so by finding the time difference between latest bookmark update log entry and any other bookmark update log entry. Now, if time difference between these two log entries (for commit B and for commit A) is more than max_delay_secs (which happens only if commit rate is low e.g. during the weekends), then the alarm would fire because the delay between latest bookmark update log entry (the one that moved BM to commit B) and previous log entry (the one that moved BM to commit A) is too large. This diff fixes this race by skipping newest entries until we found a bookmark update log entry which points to the large commit that find_bookmark_diff returned. Reviewed By: ikostia Differential Revision: D25196760 fbshipit-source-id: dfa0dca0001b1c38759ec9f4f790cfa3197ae2cf |
||
---|---|---|
.. | ||
fs | ||
integration | ||
locale | ||
mononoke | ||
scm | ||
test_support | ||
test-data | ||
.gitignore | ||
Eden.project.toml |