You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by am...@apache.org on 2011/10/20 20:19:02 UTC
svn commit: r1186974 - in /trafficserver/traffic/trunk: CHANGES
lib/wccp/WccpEndPoint.cc
Author: amc
Date: Thu Oct 20 18:19:01 2011
New Revision: 1186974
URL: http://svn.apache.org/viewvc?rev=1186974&view=rev
Log:
TS-991: WCCP race/stall condition fix.
Modified:
trafficserver/traffic/trunk/CHANGES
trafficserver/traffic/trunk/lib/wccp/WccpEndPoint.cc
Modified: trafficserver/traffic/trunk/CHANGES
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/CHANGES?rev=1186974&r1=1186973&r2=1186974&view=diff
==============================================================================
--- trafficserver/traffic/trunk/CHANGES (original)
+++ trafficserver/traffic/trunk/CHANGES Thu Oct 20 18:19:01 2011
@@ -1,5 +1,7 @@
-*- coding: utf-8 -*-
Changes with Apache Traffic Server 3.1.1
+ *) [TS-991] Fixed race / stall condition for WCCP during restart.
+
*) [TS-985] ts/ts.h uses C++ comments, which are technically not C.
*) [TS-928] Compile problem in TsErrataUtil on FreeBSD 8.
Modified: trafficserver/traffic/trunk/lib/wccp/WccpEndPoint.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/lib/wccp/WccpEndPoint.cc?rev=1186974&r1=1186973&r2=1186974&view=diff
==============================================================================
--- trafficserver/traffic/trunk/lib/wccp/WccpEndPoint.cc (original)
+++ trafficserver/traffic/trunk/lib/wccp/WccpEndPoint.cc Thu Oct 20 18:19:01 2011
@@ -784,6 +784,7 @@ CacheImpl::handleISeeYou(IpHeader const&
);
}
}
+ time_t then = ar_spot->m_recv.m_time; // used for comparisons later.
ar_spot->m_recv.set(now, recv_id);
ar_spot->m_generation = msg.m_router_view.getChangeNumber();
router_idx = ar_spot - group.m_routers.begin();
@@ -815,6 +816,11 @@ CacheImpl::handleISeeYou(IpHeader const&
ac_spot->m_src.resize(group.m_routers.size());
logf(LVL_INFO, "Added cache %s to view %d", ip_addr_to_str(cache.getAddr()), group.m_svc.getSvcId());
view_changed = true;
+ } else {
+ // Check if the cache wasn't reported last time but was reported
+ // this time. In that case we need to bump the view to trigger
+ // assignment generation.
+ if (ac_spot->m_src[router_idx].m_time != then) view_changed = true;
}
ac_spot->m_id.fill(cache);
// If cache is this cache, update data in router record.