ocket8888 commented on a change in pull request #5088:
URL: https://github.com/apache/trafficcontrol/pull/5088#discussion_r498447700
##########
File path: traffic_monitor/ds/stat.go
##########
@@ -49,16 +49,16 @@ func addAvailableData(dsStats *dsdata.Stats, crStates
tc.CRStates, serverCachegr
log.Infof("CreateStats not adding availability data for
'%s': not found in Cachegroups\n", cache)
continue
}
- deliveryServices, ok := serverDs[cache]
- if !ok {
- log.Infof("CreateStats not adding availability data for
'%s': not found in DeliveryServices\n", cache)
- continue
- }
cacheType, ok := serverTypes[cache]
if !ok {
log.Infof("CreateStats not adding availability data for
'%s': not found in Server Types\n", cache)
continue
}
+ deliveryServices, ok := serverDs[cache]
+ if !ok && cacheType != tc.CacheTypeMid {
Review comment:
This isn't sufficient to determine that a cache is not a mid. The
approach varies from place to place - TP in some places checks for names
matching `.*MID.*`, queries in TO typically do something like 'MID%' - but I
think the most common is to check if the type name begins with
`tc.MidTypePrefix`.
----------------------------------------------------------------
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]