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 2018/12/13 22:10:15 UTC

[GitHub] dneuman64 closed pull request #312: [TC-166] Traffic Router now updates the lastConfigCheck stat if timestamps of …

dneuman64 closed pull request #312: [TC-166] Traffic Router now updates the lastConfigCheck stat if timestamps of …
URL: https://github.com/apache/trafficcontrol/pull/312
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/traffic_router/core/src/main/java/com/comcast/cdn/traffic_control/traffic_router/core/config/ConfigHandler.java b/traffic_router/core/src/main/java/com/comcast/cdn/traffic_control/traffic_router/core/config/ConfigHandler.java
index ed61c5633..7302cf5ca 100644
--- a/traffic_router/core/src/main/java/com/comcast/cdn/traffic_control/traffic_router/core/config/ConfigHandler.java
+++ b/traffic_router/core/src/main/java/com/comcast/cdn/traffic_control/traffic_router/core/config/ConfigHandler.java
@@ -126,6 +126,11 @@ public boolean processConfig(final String jsonStr) throws JSONException, IOExcep
 			date = new Date(sts * 1000L);
 
 			if (sts <= getLastSnapshotTimestamp()) {
+				if (sts == getLastSnapshotTimestamp()) {
+					//only call this if they are equal so that the lastConfigCheck stat is updated
+					//if the incoming timestamp is <, there could be a problem so we don't want to update the stat
+					trafficRouterManager.setCacheRegister(null);
+				}
 				cancelled.set(false);
 				isProcessing.set(false);
 				publishStatusQueue.clear();


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services