|author||Andrii Shyshkalov <firstname.lastname@example.org>||Sat Jun 19 05:40:09 2021|
|committer||LUCI CQ <email@example.com>||Sat Jun 19 05:40:09 2021|
[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 <firstname.lastname@example.org> Commit-Queue: Yiwei Zhang <email@example.com> Reviewed-by: Yiwei Zhang <firstname.lastname@example.org>
fetch infra cd infra/go eval `./env.py` cd src/go.chromium.org/luci
Contributing uses the same flow as Chromium contributions.