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 2021/01/08 16:13:11 UTC

[GitHub] [trafficcontrol] zrhoffman commented on a change in pull request #5416: Limit which Topology parent CacheGroup Servers to check for updates

zrhoffman commented on a change in pull request #5416:
URL: https://github.com/apache/trafficcontrol/pull/5416#discussion_r554040500



##########
File path: traffic_ops/traffic_ops_golang/server/servers_update_status.go
##########
@@ -51,39 +53,44 @@ func getServerUpdateStatus(tx *sql.Tx, cfg *config.Config, hostName string) ([]t
 
 	selectQuery := `
 /* topology_ancestors finds the ancestor topology nodes of the topology node for
- * the cachegroup containing server $4.
+ * the cachegroup containing server $5.
  */
 WITH RECURSIVE topology_ancestors AS (
 /* This is the base case of the recursive CTE, the topology node for the
- * cachegroup containing server $4.
+ * cachegroup containing server $5.
  */
 	SELECT tcp.child parent, NULL cachegroup, s.id base_server_id
 	FROM "server" s
 	JOIN cachegroup c ON s.cachegroup = c.id
 	JOIN topology_cachegroup tc ON c."name" = tc.cachegroup
 	JOIN topology_cachegroup_parents tcp ON tc.id = tcp.child
-	WHERE s.host_name = $4
+	WHERE s.host_name = $5
 UNION ALL
 /* Find all direct topology parent nodes tc of a given topology ancestor ta. */
 	SELECT tcp.parent, tc.cachegroup, ta.base_server_id
 	FROM topology_ancestors ta, topology_cachegroup_parents tcp
 	JOIN topology_cachegroup tc ON tcp.parent = tc.id
+	JOIN cachegroup c ON tc.cachegroup = c."name"
+	JOIN "type" t ON c."type" = t.id
 	WHERE ta.parent = tcp.child
+	AND t."name" = ANY($4::TEXT[])

Review comment:
       Checking for Cache Group types that start with `EDGE` or `MID` in eaf05d2e54




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