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

luci-go: LUCI services and tools in Go

GoDoc

Installing

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

Contributing uses the same flow as Chromium contributions.