traeak commented on code in PR #6859:
URL: https://github.com/apache/trafficcontrol/pull/6859#discussion_r906104744


##########
lib/go-atscfg/parentdotconfig.go:
##########
@@ -386,214 +403,231 @@ func makeParentDotConfigData(
                                continue
                        }
 
-                       if txt != nil { // will be nil with no error if this 
server isn't in the Topology, or if it doesn't have the Required Capabilities
-                               parentAbstraction.Services = 
append(parentAbstraction.Services, txt)
+                       if pasvc != nil { // will be nil with no error if this 
server isn't in the Topology, or if it doesn't have the Required Capabilities
+                               parentAbstraction.Services = 
append(parentAbstraction.Services, pasvc)
                        }
-               } else if cacheIsTopLevel {
-                       parentQStr := false
-                       if dsParams.QueryStringHandling == "" && 
dsParams.Algorithm == tc.AlgorithmConsistentHash && ds.QStringIgnore != nil && 
tc.QStringIgnore(*ds.QStringIgnore) == tc.QStringIgnoreUseInCacheKeyAndPassUp {
-                               parentQStr = true
-                       }
-
-                       orgFQDNStr := *ds.OrgServerFQDN
-                       // if this cache isn't the last tier, i.e. we're not 
going to the origin, use http not https
-                       if isLastCacheTier := 
noTopologyServerIsLastCacheForDS(server, &ds); !isLastCacheTier {
-                               orgFQDNStr = strings.Replace(orgFQDNStr, 
`https://`, `http://`, -1)
-                       }
-                       orgURI, orgWarns, err := getOriginURI(orgFQDNStr)
-                       warnings = append(warnings, orgWarns...)
-                       if err != nil {
-                               warnings = append(warnings, "DS '"+*ds.XMLID+"' 
has malformed origin URI: '"+orgFQDNStr+"': skipping!"+err.Error())
-                               continue
+               } else {
+                       isLastCacheTier := 
noTopologyServerIsLastCacheForDS(server, &ds)
+                       serverPlacement := TopologyPlacement{
+                               IsLastCacheTier:  isLastCacheTier,
+                               IsFirstCacheTier: !isLastCacheTier,

Review Comment:
   changed the logic so:
           IsFirstCacheTier: !isLastCacheTier || !ds.Type.UsesMidCache(),
   



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to