mitchell852 commented on a change in pull request #5128:
URL: https://github.com/apache/trafficcontrol/pull/5128#discussion_r505741605



##########
File path: traffic_ops/traffic_ops_golang/server/servers.go
##########
@@ -1009,7 +1013,12 @@ func getMidServers(edgeIDs []int, servers 
map[int]tc.ServerNullable, tx *sqlx.Tx
        WHERE s.id IN (?)))
        `
 
-       query, args, err := sqlx.In(q, edgeIDs)
+       if cdnID > 0 {
+               q += ` AND s.cdn_id = ?`
+               filters = append(filters, cdnID)
+       }

Review comment:
       for example, if i say "give me all the mids associated with these 5 
edges", it possible those 5 edges are in different cdns, so in that case, don't 
even worry about the cdn. however, it turns out that the only use of this 
method is in the context of a DS, where you'd always want to filter by cdn...




----------------------------------------------------------------
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:
[email protected]


Reply via email to