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 2022/04/20 18:19:13 UTC

[GitHub] [trafficcontrol] srijeet0406 commented on a diff in pull request #6757: updated cert expirations to only show Active DSes

srijeet0406 commented on code in PR #6757:
URL: https://github.com/apache/trafficcontrol/pull/6757#discussion_r854427219


##########
traffic_ops/traffic_ops_golang/trafficvault/backends/postgres/postgres.go:
##########
@@ -199,12 +215,10 @@ func (p *Postgres) GetExpirationInformation(tx *sql.Tx, ctx context.Context, day
 		if err = rows.Scan(&expirationInfo.DeliveryService, &expirationInfo.CDN, &expirationInfo.Provider, &expirationInfo.Expiration); err != nil {
 			return []tc.SSLKeyExpirationInformation{}, err
 		}
-		expirationInfo.Federated = false
-		for _, fed := range fedList {
-			if fed == expirationInfo.DeliveryService {
-				expirationInfo.Federated = true
-			}
+		if util.ContainsStr(inactiveList, expirationInfo.DeliveryService) {

Review Comment:
   If we have a large number of inactive delivery services, this call might have to iterate over a number of items trying to find a match. Do you think a map could be better, in terms of reducing the lookup time, etc.?



-- 
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: issues-unsubscribe@trafficcontrol.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org