trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zw...@apache.org
Subject git commit: TS-1266 RAM cache stats are wrong with CLFUS
Date Wed, 05 Sep 2012 23:05:59 GMT
Updated Branches:
  refs/heads/master 82712065b -> 20443732b


TS-1266 RAM cache stats are wrong with CLFUS


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/20443732
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/20443732
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/20443732

Branch: refs/heads/master
Commit: 20443732b36e8a794a5878737d5a9a18452321e7
Parents: 8271206
Author: Leif Hedstrom <zwoop@apache.org>
Authored: Wed Sep 5 17:01:24 2012 -0600
Committer: Leif Hedstrom <zwoop@apache.org>
Committed: Wed Sep 5 17:01:24 2012 -0600

----------------------------------------------------------------------
 CHANGES                       |    2 ++
 iocore/cache/RamCacheCLFUS.cc |    4 ++--
 2 files changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/20443732/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index e655f30..b53bcaf 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,8 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache Traffic Server 3.3.0
 
+  *) [TS-1266] RAM cache stats are wrong with CLFUS.
+
   *) [TS-1437] Make the Lua plugin compile on RedHat based distros.
 
   *) [TS-1436] Added Yahoo directory layout for installation.

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/20443732/iocore/cache/RamCacheCLFUS.cc
----------------------------------------------------------------------
diff --git a/iocore/cache/RamCacheCLFUS.cc b/iocore/cache/RamCacheCLFUS.cc
index becf2fb..69feb42 100644
--- a/iocore/cache/RamCacheCLFUS.cc
+++ b/iocore/cache/RamCacheCLFUS.cc
@@ -289,7 +289,7 @@ RamCacheCLFUSEntry *RamCacheCLFUS::destroy(RamCacheCLFUSEntry *e) {
   if (!e->flag_bits.lru) {
     objects--;
     bytes -= e->size + ENTRY_OVERHEAD;
-    CACHE_SUM_DYN_STAT_THREAD(cache_ram_cache_bytes_stat, -e->size);
+    CACHE_SUM_DYN_STAT_THREAD(cache_ram_cache_bytes_stat, -(int64_t)e->size);
     e->data = NULL;
   } else
     history--;
@@ -510,7 +510,7 @@ int RamCacheCLFUS::put(INK_MD5 *key, IOBufferData *data, uint32_t len,
bool copy
       return 0;
     }
     bytes -= victim->size + ENTRY_OVERHEAD;
-    CACHE_SUM_DYN_STAT_THREAD(cache_ram_cache_bytes_stat, -victim->size);
+    CACHE_SUM_DYN_STAT_THREAD(cache_ram_cache_bytes_stat, -(int64_t)victim->size);
     victims.enqueue(victim);
     if (victim == compressed)
       compressed = 0;


Mime
View raw message