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 2019/04/05 20:33:13 UTC

[GitHub] [trafficcontrol] mitchell852 opened a new issue #3472: Inaccurate query being used to fetch mid servers for a delivery service

mitchell852 opened a new issue #3472: Inaccurate query being used to fetch mid servers for a delivery service
URL: https://github.com/apache/trafficcontrol/issues/3472
 
 
   I don't believe this query used in this function is quite right:
   
   https://github.com/apache/trafficcontrol/blob/master/traffic_ops/traffic_ops_golang/server/servers.go#L303
   
   It basically evaluates to this:
   
   `SELECT *
   FROM server AS s
   WHERE s.id IN (
       SELECT mid.id FROM server mid
       JOIN cachegroup cg ON cg.id IN (
           SELECT cg.parent_cachegroup_id
           FROM server s
           JOIN cachegroup cg ON cg.id = s.cachegroup
           WHERE s.id IN (71))
       JOIN type t ON mid.type = (SELECT id FROM type WHERE name = 'MID'))`
   
   which regardless of which server id is fed into it always seems to return all the mid servers...
   
   

----------------------------------------------------------------
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


With regards,
Apache Git Services