Uploaded image for project: 'SonarQube'
  1. SonarQube
  2. SONAR-7307

Improve speed of SQL query polling of Compute Engine queue

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.5
    • Component/s: Compute Engine
    • Labels:

      Description

      Currently, the SQL query used to poll the CE_QUEUE table (see CeQueueMapper#selectEligibleForPeek) for new tasks to process returns every tasks in PENDING status when only the first one (after in DB sorting) is actually used.

      This does not add extra cost when the queue is small to empty, but the bigger is the queue, the more often it is queried (right after a task is finished) and the most costly the SQL request is (because of useless data returned to SQ and loaded in memory).

      A limit should be added to the SQL query.

        Attachments

          Activity

            People

            Assignee:
            sebastien.lesaint Sebastien Lesaint
            Reporter:
            sebastien.lesaint Sebastien Lesaint
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Due:
              Created:
              Updated:
              Resolved: