You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2013/04/02 01:19:44 UTC
[1/2] git commit: TS-1632 RecDecrRawStat does not seem to work as
intended
Updated Branches:
refs/heads/master 0af1d8acc -> 727fbf717
TS-1632 RecDecrRawStat does not seem to work as intended
Note that part of this was committed in TS-1674. But I think
the additional "safety" checks from the v2 patch makes sense.
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/76e5a90b
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/76e5a90b
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/76e5a90b
Branch: refs/heads/master
Commit: 76e5a90b45359e10d68ce99abe64ea016873597f
Parents: 0af1d8a
Author: Yakov Kopel <yk...@websense.com>
Authored: Mon Apr 1 17:16:51 2013 -0600
Committer: Leif Hedstrom <zw...@apache.org>
Committed: Mon Apr 1 17:16:51 2013 -0600
----------------------------------------------------------------------
lib/records/RecProcess.cc | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/76e5a90b/lib/records/RecProcess.cc
----------------------------------------------------------------------
diff --git a/lib/records/RecProcess.cc b/lib/records/RecProcess.cc
index 044de2b..a85e2a0 100644
--- a/lib/records/RecProcess.cc
+++ b/lib/records/RecProcess.cc
@@ -118,6 +118,9 @@ raw_stat_get_total(RecRawStatBlock *rsb, int id, RecRawStat *total)
total->sum += tlp->sum;
total->count += tlp->count;
}
+ if (total->sum < 0) { // Assure that we stay positive
+ total->sum = 0;
+ }
return REC_ERR_OKAY;
}
@@ -142,6 +145,9 @@ raw_stat_sync_to_global(RecRawStatBlock *rsb, int id)
total.sum += tlp->sum;
total.count += tlp->count;
}
+ if (total.sum < 0) { // Assure that we stay positive
+ total.sum = 0;
+ }
// lock so the setting of the globals and last values are atomic
ink_mutex_acquire(&(rsb->mutex));
[2/2] git commit: Added TS-1632.
Posted by zw...@apache.org.
Added TS-1632.
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/727fbf71
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/727fbf71
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/727fbf71
Branch: refs/heads/master
Commit: 727fbf717e2eee6becdcdd1c675d5218074d1536
Parents: 76e5a90
Author: Leif Hedstrom <zw...@apache.org>
Authored: Mon Apr 1 17:18:46 2013 -0600
Committer: Leif Hedstrom <zw...@apache.org>
Committed: Mon Apr 1 17:18:46 2013 -0600
----------------------------------------------------------------------
CHANGES | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/727fbf71/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index 4880ea9..a31e7c8 100644
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,10 @@
Changes with Apache Traffic Server 3.3.2
+ *) [TS-1632] In addition to the changes from TS-1674, also add
+ some safety measures assuring that the stats sums don't go
+ negative. Author: Yakov Kopel.
+
*) [TS-1789] Script to compare RecordsConfig.cc default values with
records.config.default.in: Author: Mark Harrison.