zrhoffman commented on a change in pull request #5088:
URL: https://github.com/apache/trafficcontrol/pull/5088#discussion_r498492783
##########
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:
The cache types are originally from `todata.getServerTypes()` which
already converts the server type to a well-defined one:
```go
t := tc.CacheTypeFromString(serverData.Type)
```
Also, `cacheType` is of type `tc.CacheType`, so the only possible values are
`CacheType("EDGE")`, `CacheType("MID")`, and `CacheType("")`
----------------------------------------------------------------
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]