trafficcontrol-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From els...@apache.org
Subject [incubator-trafficcontrol] 12/36: Properly fall back to the regular CZF if deep CZF miss
Date Wed, 24 Jan 2018 17:23:21 GMT
This is an automated email from the ASF dual-hosted git repository.

elsloo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-trafficcontrol.git

commit de838120767bce3484fde6d460b3cee0cbf69f3b
Author: Rawlin Peters <rawlin_peters@comcast.com>
AuthorDate: Thu Oct 26 16:32:56 2017 -0600

    Properly fall back to the regular CZF if deep CZF miss
---
 .../traffic_control/traffic_router/core/router/TrafficRouter.java  | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/traffic_router/core/src/main/java/com/comcast/cdn/traffic_control/traffic_router/core/router/TrafficRouter.java
b/traffic_router/core/src/main/java/com/comcast/cdn/traffic_control/traffic_router/core/router/TrafficRouter.java
index 76c5627..705ec5b 100644
--- a/traffic_router/core/src/main/java/com/comcast/cdn/traffic_control/traffic_router/core/router/TrafficRouter.java
+++ b/traffic_router/core/src/main/java/com/comcast/cdn/traffic_control/traffic_router/core/router/TrafficRouter.java
@@ -256,7 +256,7 @@ public class TrafficRouter {
 			// Deep caching is enabled. See if there are deep caches available
 			cacheLocation = getDeepCoverageZoneCacheLocation(request.getClientIP(), ds);
 			if (cacheLocation != null && cacheLocation.getCaches().size() != 0) {
-				// Found deep caches for this client, and there are caches available there.
+				// Found deep caches for this client, and there are caches that might be available there.
 				// Use the deep cacheLocation, and set result to DEEP_CZ
 				result = ResultType.DEEP_CZ;
 			} else {
@@ -673,6 +673,11 @@ public class TrafficRouter {
 			return cacheLocation;
 		}
 
+		if (useDeep) {
+			// no available deep caches in the deep CZF (fall back to regular CZF)
+			return null;
+		}
+
 		// We had a hit in the CZF but the name does not match a known cache location.
 		// Check whether the CZF entry has a geolocation and use it if so.
 		return getClosestCacheLocation(cacheRegister.filterAvailableLocations(deliveryServiceId),
networkNode.getGeolocation(), cacheRegister.getDeliveryService(deliveryServiceId));

-- 
To stop receiving notification emails like this one, please contact
elsloo@apache.org.

Mime
View raw message