You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by br...@apache.org on 2013/01/30 20:39:02 UTC
git commit: TS-1674: TSStatIntDecrement is broken: logic is flawed
Updated Branches:
refs/heads/master 49e352f97 -> 6d573ce58
TS-1674: TSStatIntDecrement is broken: logic is flawed
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/6d573ce5
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/6d573ce5
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/6d573ce5
Branch: refs/heads/master
Commit: 6d573ce581846663508067766a6960b77d2cc6aa
Parents: 49e352f
Author: Brian Geffon <br...@apache.org>
Authored: Wed Jan 30 11:38:53 2013 -0800
Committer: Brian Geffon <br...@apache.org>
Committed: Wed Jan 30 11:38:53 2013 -0800
----------------------------------------------------------------------
CHANGES | 2 ++
lib/records/I_RecProcess.h | 7 ++-----
2 files changed, 4 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/6d573ce5/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index 3768251..0249742 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,5 +1,7 @@
-*- coding: utf-8 -*-
Changes with Apache Traffic Server 3.3.1
+ *) [TS-1674] TSStatIntDecrement is broken: the logic is flawed.
+
*) [TS-1673] Remap with recv port is using the wrong port
*) [TS-1672] Emergency throttling can continue forever.
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/6d573ce5/lib/records/I_RecProcess.h
----------------------------------------------------------------------
diff --git a/lib/records/I_RecProcess.h b/lib/records/I_RecProcess.h
index 58ef279..e5c0506 100644
--- a/lib/records/I_RecProcess.h
+++ b/lib/records/I_RecProcess.h
@@ -134,15 +134,12 @@ RecIncrRawStat(RecRawStatBlock * rsb, EThread * ethread, int id, int64_t incr)
return REC_ERR_OKAY;
}
-/* This does not seem to work as intended ... */
inline int
RecDecrRawStat(RecRawStatBlock * rsb, EThread * ethread, int id, int64_t decr)
{
RecRawStat *tlp = raw_stat_get_tlp(rsb, id, ethread);
- if (decr <= tlp->sum) { // Assure that we stay positive
- tlp->sum -= decr;
- tlp->count += 1;
- }
+ tlp->sum -= decr;
+ tlp->count += 1;
return REC_ERR_OKAY;
}