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/14 22:53:19 UTC

[GitHub] [trafficcontrol] mitchell852 commented on a change in pull request #5128: strips out mids in the wrong cdn when requesting servers for a ds

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



##########
File path: traffic_ops/traffic_ops_golang/server/servers.go
##########
@@ -987,19 +994,16 @@ func getServers(h http.Header, params map[string]string, tx *sqlx.Tx, user *auth
 	return returnable, serverCount, nil, nil, http.StatusOK, &maxTime
 }
 
-// getMidServers gets the mids used by the servers in this DS.
-//
-// Original comment from the Perl code:
-//
-// If the delivery service employs mids, we're gonna pull mid servers too by
-// pulling the cachegroups of the edges and finding those cachegroups parent
-// cachegroup... then we see which servers have cachegroup in parent cachegroup
-// list...that's how we find mids for the ds :)
-func getMidServers(edgeIDs []int, servers map[int]tc.ServerNullable, tx *sqlx.Tx) ([]int, error, error, int) {
+// getMidServers gets the mids used by the edges provided with an option to filter for a given cdn
+func getMidServers(edgeIDs []int, servers map[int]tc.ServerNullable, cdnID int, tx *sqlx.Tx) ([]int, error, error, int) {

Review comment:
       ah cool. thx
   




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