[cv][gerrit] ensure eventually refresh happens even with UpdatedHint.

 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>
3 files changed
tree: ba2ef2e7c70ada4c908876bf47fb9813aa8b4fc1
  1. appengine/
  2. auth/
  3. buildbucket/
  4. casviewer/
  5. cipd/
  6. client/
  7. cmdrunner/
  8. common/
  9. config/
  10. cq/
  11. cv/
  12. dm/
  13. examples/
  14. gae/
  15. gce/
  16. grpc/
  17. hacks/
  18. hardcoded/
  19. led/
  20. logdog/
  21. luci_notify/
  22. lucicfg/
  23. lucictx/
  24. luciexe/
  25. machine-db/
  26. milo/
  27. mmutex/
  28. mp/
  29. resultdb/
  30. scheduler/
  31. server/
  32. starlark/
  33. swarming/
  34. tokenserver/
  35. tools/
  36. tumble/
  37. vpython/
  38. web/
  39. .gitallowed
  40. .gitattributes
  41. .gitignore
  42. .golangci.yml
  44. codereview.settings
  48. OWNERS
  49. PRESUBMIT.py
  50. README.md

luci-go: LUCI services and tools in Go



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.