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
julieqiu opened this issue Jul 1, 2020 · 2 comments
Closed

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

julieqiu opened this issue Jul 1, 2020 · 2 comments
Assignees
Labels
Milestone

Comments

@julieqiu
Copy link
Contributor

@julieqiu 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
Copy link
Contributor Author

@julieqiu julieqiu commented Jul 1, 2020

@jba
Copy link
Contributor

@jba jba commented Jul 20, 2020

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

@jba jba closed this Jul 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants