sapling/eden
Stanislau Hlebik 0d27cac271 mononoke: fix cross-repo bookmark validation alarm
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
2020-11-30 14:06:31 -08:00
..
fs Fix eden du --clean on MacOS 2020-11-20 17:25:55 -08:00
integration return a better error message if something includes . or .. in their glob 2020-11-17 12:53:39 -08:00
locale add a copyright header to glibc_en.po 2019-04-26 14:38:27 -07:00
mononoke mononoke: fix cross-repo bookmark validation alarm 2020-11-30 14:06:31 -08:00
scm fsmonitor: filter out non-utf8 files 2020-11-30 10:22:13 -08:00
test_support Manually upgrading eden, and fixing their config 2020-08-06 12:37:04 -07:00
test-data enable treemanifest in snapshots 2019-08-28 18:46:03 -07:00
.gitignore eden: wire up mac contbuild 2019-02-05 21:52:30 -08:00
Eden.project.toml