You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by GitBox <gi...@apache.org> on 2020/10/26 19:27:05 UTC

[GitHub] [trafficcontrol] rawlinp opened a new issue #5191: Traffic Ops IMS query for /federations/all doesn't work

rawlinp opened a new issue #5191:
URL: https://github.com/apache/trafficcontrol/issues/5191


   ## I'm submitting a ...
   -  bug report
   
   ## Traffic Control components affected ...
   -  Traffic Ops
   
   ## Current behavior:
   When requesting the `GET /federations/all` route with `use_ims = true` in cdn.conf, the following warning message is printed:
   ```
   WARNING: allfederations.go:242: 2020-10-26T13:13:22.87762-06:00: Couldn't get the max last updated time: pq: got 1 parameters but the statement requires 0
   ```
   This is because the query doesn't use a parameter, but a parameter `""` is passed anyways: 
   ```
       imsQuery := `SELECT max(t) from (
           SELECT max(fds.last_updated) as t FROM
     federation_deliveryservice fds
     JOIN deliveryservice ds ON ds.id = fds.deliveryservice
     JOIN federation fd ON fd.id = fds.federation
       UNION ALL
       select max(last_updated) as t from last_deleted l where l.table_name='federation_deliveryservice') as res`
   
       if useIMS {
           runSecond, maxTime = tryIfModifiedSinceQuery(header, tx, "", imsQuery)
   ```
   
   ## Expected behavior:
   The query should not be passed a parameter in this case and should succeed.
   
   ## Minimal reproduction of the problem with instructions:
   Set `use_ims = true` in cdn.conf and request `GET /federations/all`.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [trafficcontrol] zrhoffman closed issue #5191: Traffic Ops IMS query for /federations/all doesn't work

Posted by GitBox <gi...@apache.org>.
zrhoffman closed issue #5191:
URL: https://github.com/apache/trafficcontrol/issues/5191


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org