Navigation Menu

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/pkgsite: combine the queue logic in /poll-and-queue and /requeue #39975

Closed
3 tasks
julieqiu opened this issue Jul 1, 2020 · 2 comments
Closed
3 tasks

x/pkgsite: combine the queue logic in /poll-and-queue and /requeue #39975

julieqiu opened this issue Jul 1, 2020 · 2 comments
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. pkgsite
Milestone

Comments

@julieqiu
Copy link
Member

julieqiu commented Jul 1, 2020

At the moment, we enqueue modules to the task queue via these two endpoints:

  • /poll-and-queue: enqueues new modules from the index

  • /requeue: enqueues modules with status 50x

As a result, when we are are reprocessing modules, new modules might end up taking longer to be proccessed. For example: #39564 and https://gophers.slack.com/archives/C0VPK4Z5E/p1591981603268600.

Rather than calling s.queue.ScheduleFetch in handleIndexAndQueue, we should change the enqueuing logic as follows:

  • Separate /poll-and-queue and /requeue into these two endpoints:

  • /poll: polls the module index and inserts into module version states

  • /enqueue: call postgres.GetNextModulesToFetch to figure out which modules to enqueue next

  • Change postgres.GetNextModulesToFetch to prioritize enqueuing modules with status=0, ahead of modules with status 50x

  • Deprecate /poll-and-queue and /requeue

@gopherbot gopherbot added this to the Unreleased milestone Jul 1, 2020
@julieqiu julieqiu added pkgsite NeedsFix The path to resolution is known, but the work has not been done. labels Jul 1, 2020
@julieqiu
Copy link
Member Author

julieqiu commented Jul 1, 2020

Related commits:

golang/pkgsite@08e8e66
golang/pkgsite@35d4419

@jba
Copy link
Contributor

jba commented Jul 20, 2020

This was fixed by https://golang.org/cl/239480 and deployed.

@jba jba closed this as completed Jul 20, 2020
@golang golang locked and limited conversation to collaborators Jul 20, 2021
@rsc rsc unassigned jba Jun 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. pkgsite
Projects
None yet
Development

No branches or pull requests

3 participants