srijeet0406 commented on a change in pull request #4953:
URL: https://github.com/apache/trafficcontrol/pull/4953#discussion_r470288496



##########
File path: traffic_ops/traffic_ops_golang/deliveryservice/servers/servers.go
##########
@@ -814,7 +814,7 @@ func (dss *TODSSDeliveryService) Read(h http.Header, useIMS 
bool) ([]interface{}
 
 func selectMaxLastUpdatedQuery(where string) string {
        return `SELECT max(t) from (
-               SELECT max(dss.last_updated) as t from deliveryservice_server 
dss ` + where +
+               SELECT max(dss.last_updated) as t from deliveryservice_server 
dss JOIN deliveryservice ds ON ds.id = dss.deliveryservice ` + where +

Review comment:
       We will actually need this one always, because we look for the DS ID in 
the params and if its not present, we return there. So if it makes it to this 
line, we are guaranteed that we do have a delivery service id, denoted by `id` 
in the params. 

##########
File path: traffic_ops/traffic_ops_golang/server/servers.go
##########
@@ -611,7 +611,8 @@ JOIN cdn cdn ON s.cdn_id = cdn.id
 JOIN phys_location pl ON s.phys_location = pl.id
 JOIN profile p ON s.profile = p.id
 JOIN status st ON s.status = st.id
-JOIN type t ON s.type = t.id ` + where +
+JOIN type t ON s.type = t.id 
+FULL OUTER JOIN deliveryservice_server dss ON dss.server = s.id ` + where +

Review comment:
       Fixed




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