Uploaded image for project: 'Hybrid Cloud Console'
  1. Hybrid Cloud Console
  2. RHCLOUD-31330

[playbook-dispatcher] pass run-id to update sql statement to improve performance

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Normal Normal
    • None
    • None
    • None
    • False
    • Hide

      None

      Show
      None
    • False
    • Unset
    • No
    • Platform Pipeline Q1 Tech Debt, Platform Pipeline Sprint 83

      The queries in the response-consumer appear to be driving the load on the database up.

      The "select id, status, response_full from runs where org_id = ? and correlation_id = ?"  runs for each response the response consumer processes.  We use this query to retrieve the run id.  https://github.com/RedHatInsights/playbook-dispatcher/blob/master/internal/response-consumer/handler.go#L84

      However, we do not use the run id when we go to update the record in the runs table...so we have to do the more expensive search again.

      Let's try passing the run-id to the update statement.  We still need to build an index for these 2 queries.

            rhn-support-dehort Derek Horton
            rhn-support-dehort Derek Horton
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: