commit | 3f0ecc8dab0de7832d61662e977cdc894abc778d | [log] [tgz] |
---|---|---|
author | Andrii Shyshkalov <tandrii@google.com> | Sat Jun 19 05:40:09 2021 |
committer | LUCI CQ <infra-scoped@luci-project-accounts.iam.gserviceaccount.com> | Sat Jun 19 05:40:09 2021 |
tree | ba2ef2e7c70ada4c908876bf47fb9813aa8b4fc1 | |
parent | ffd2028f108369d866d62cdd2e5214128e3d2070 [diff] |
[cv][gerrit] ensure eventually refresh happens even with UpdatedHint. Use-case: 1. Poller notices CL updated at time U in Gerrit index. Poller triggers task T1 to refresh the CL with UpdatedHint=U. 2. Updater hits stale Gerrit replica, the CL is marked with NoAccess in Datastore, but the task succeeds. A new task to re-check CL state is scheduled with 1 minute delay, up to 10 such follow up tasks, designed to eventually hit a not-stale replica. 3. In rare cases, all follow up tasks hit stale replica, and mark CL with "stable" lost access, s.t. CV can proceed with computation. 4. Poller performs a "full" poll, which re-scans all CLs with CQ>0. The CL is discovered again with the same Updated=U. Poller triggers a new refresh task with UpdatedHint=U. However, TQ de-duplicates this task. 5. Gerrit replicas catch up. => but CV isn't refreshing the CL and the user of the CL is waiting. So, solve this by limiting de-duplication window. This was already the case for CLs being refreshed "blindly", meaning without a known Updated time (e.g. after a SetReview RPC), and now the same applies to non-blind refreshes, too. R=qyearsley, yiwzhang Change-Id: Ic1f3f1f07644246b30855fd4bd87bb17cf7a0a54 Reviewed-on: https://chromium-review.googlesource.com/c/infra/luci/luci-go/+/2972979 Auto-Submit: Andrii Shyshkalov <tandrii@google.com> Commit-Queue: Yiwei Zhang <yiwzhang@google.com> Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
LUCI Go code is meant to be worked on from an Chromium infra.git checkout, which enforces packages versions and Go toolchain version. First get fetch via depot_tools.git then run:
fetch infra cd infra/go eval `./env.py` cd src/go.chromium.org/luci
Contributing uses the same flow as Chromium contributions.