Uploaded image for project: 'Traffic Control'
  1. Traffic Control
  2. TC-372

Assigning ds's to user thru API takes too long

    XMLWordPrintableJSON

    Details

      Description

      POST /api/$version/deliveryservice_user takes the following payload:

      { userId: 42, deliveryServices: [1,2,3,4,5,6,7,8,9...] }

      and it loops thru each ds to perform a query to see if it exists and then does a query to do an insert into the deliveryservice_tmuser table. so if you're assigning 500 ds's to a user...you end up with 1000 queries...
      need to optimize this endpoint.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                mitchell852@apache.org Jeremy Mitchell
                Reporter:
                mitchell852@apache.org Jeremy Mitchell
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: