#2184 frontend: texlive DoS for DistGit again
Merged 2 years ago by praiskup. Opened 2 years ago by praiskup.
Unknown source dist-git-import-fix  into  main

@@ -40,8 +40,7 @@

      tasks = []

  

      builds_for_import = BuildsLogic.get_build_importing_queue().filter(models.Build.is_background == false()).limit(100).all()

-     if not builds_for_import:

-         builds_for_import = BuildsLogic.get_build_importing_queue().filter(models.Build.is_background == true()).limit(30).all()

+     builds_for_import += BuildsLogic.get_build_importing_queue().filter(models.Build.is_background == true()).limit(30).all()

  

      for build in builds_for_import:

          branches = set()

Before, even a single long running non-background DistGit import task
(e.g. for the large SRPMs like texlive) caused that all the background
import tasks were not processed for a long time.

Newly we always let the dist-git importer(s) process a part of the
background queue (if any).

Note this is not 100% ideal (several long-time running background jobs
can delay processing of non-background jobs for some time), so we should
eventually migrate the "priority queue" logic (WorkerManager
abstraction) which is already on the Backend side. Fortunately most of
the import tasks are processed instantly.

Build succeeded.

rebased onto bdf0a43

2 years ago

Build succeeded.

Commit 8ee4d1e fixes this pull-request

Pull-Request has been merged by praiskup

2 years ago