trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From z..@apache.org
Subject svn commit: r1145431 - in /trafficserver/traffic/trunk: CHANGES iocore/cache/Cache.cc iocore/cache/CacheRead.cc iocore/cache/P_CacheInternal.h mgmt/RecordsConfig.cc
Date Tue, 12 Jul 2011 02:23:14 GMT
Author: zym
Date: Tue Jul 12 02:23:13 2011
New Revision: 1145431

URL: http://svn.apache.org/viewvc?rev=1145431&view=rev
Log:
TS-870 Something wrong with the evacuate relevant codes in cache

Author: mohan_zl
Review: Leif, zym

Modified:
    trafficserver/traffic/trunk/CHANGES
    trafficserver/traffic/trunk/iocore/cache/Cache.cc
    trafficserver/traffic/trunk/iocore/cache/CacheRead.cc
    trafficserver/traffic/trunk/iocore/cache/P_CacheInternal.h
    trafficserver/traffic/trunk/mgmt/RecordsConfig.cc

Modified: trafficserver/traffic/trunk/CHANGES
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/CHANGES?rev=1145431&r1=1145430&r2=1145431&view=diff
==============================================================================
--- trafficserver/traffic/trunk/CHANGES (original)
+++ trafficserver/traffic/trunk/CHANGES Tue Jul 12 02:23:13 2011
@@ -1,6 +1,8 @@
                                                          -*- coding: utf-8 -*-
 
 Changes with Apache Traffic Server 3.1.0
+  *) [TS-870]: Fix evacuate relevant codes in cache to work, Author: mohan_zl
+
   *) [TS-869]: The stat code for ram_cache miss is lost, Author: mohan_zl
 
   *) [TS-873]: Wrong code in iocore/net/UnixNet.cc, Author: mohan_zl

Modified: trafficserver/traffic/trunk/iocore/cache/Cache.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/iocore/cache/Cache.cc?rev=1145431&r1=1145430&r2=1145431&view=diff
==============================================================================
--- trafficserver/traffic/trunk/iocore/cache/Cache.cc (original)
+++ trafficserver/traffic/trunk/iocore/cache/Cache.cc Tue Jul 12 02:23:13 2011
@@ -2695,11 +2695,9 @@ ink_cache_init(ModuleVersion v)
   }
   // TODO: These are left here, since they are only registered if HIT_EVACUATE is enabled.
 #ifdef HIT_EVACUATE
-  IOCORE_RegisterConfigInteger(RECT_CONFIG, "proxy.config.cache.hit_evacuate_percent", 0,
RECU_DYNAMIC, RECC_NULL, NULL);
   IOCORE_EstablishStaticConfigInt32(cache_config_hit_evacuate_percent, "proxy.config.cache.hit_evacuate_percent");
   Debug("cache_init", "proxy.config.cache.hit_evacuate_percent = %d", cache_config_hit_evacuate_percent);
 
-  IOCORE_RegisterConfigInteger(RECT_CONFIG, "proxy.config.cache.hit_evacuate_size_limit",
0, RECU_DYNAMIC, RECC_NULL, NULL);
   IOCORE_EstablishStaticConfigInt32(cache_config_hit_evacuate_size_limit, "proxy.config.cache.hit_evacuate_size_limit");
   Debug("cache_init", "proxy.config.cache.hit_evacuate_size_limit = %d", cache_config_hit_evacuate_size_limit);
 #endif

Modified: trafficserver/traffic/trunk/iocore/cache/CacheRead.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/iocore/cache/CacheRead.cc?rev=1145431&r1=1145430&r2=1145431&view=diff
==============================================================================
--- trafficserver/traffic/trunk/iocore/cache/CacheRead.cc (original)
+++ trafficserver/traffic/trunk/iocore/cache/CacheRead.cc Tue Jul 12 02:23:13 2011
@@ -801,7 +801,7 @@ CacheVC::openReadStartEarliest(int event
     vol->begin_read(this);
 #ifdef HIT_EVACUATE
     if (vol->within_hit_evacuate_window(&earliest_dir) &&
-        (!cache_config_hit_evacuate_size_limit || doc_len <= cache_config_hit_evacuate_size_limit))
{
+        (!cache_config_hit_evacuate_size_limit || doc_len <= (uint64_t)cache_config_hit_evacuate_size_limit))
{
       DDebug("cache_hit_evac", "dir: %d, write: %d, phase: %d",
             dir_offset(&earliest_dir), offset_to_vol_offset(vol, vol->header->write_pos),
vol->header->phase);
       f.hit_evacuate = 1;
@@ -1062,7 +1062,7 @@ CacheVC::openReadStartHead(int event, Ev
 
 #ifdef HIT_EVACUATE
     if (vol->within_hit_evacuate_window(&dir) &&
-        (!cache_config_hit_evacuate_size_limit || doc_len <= cache_config_hit_evacuate_size_limit))
{
+        (!cache_config_hit_evacuate_size_limit || doc_len <= (uint64_t)cache_config_hit_evacuate_size_limit))
{
       DDebug("cache_hit_evac", "dir: %d, write: %d, phase: %d",
             dir_offset(&dir), offset_to_vol_offset(vol, vol->header->write_pos),
vol->header->phase);
       f.hit_evacuate = 1;

Modified: trafficserver/traffic/trunk/iocore/cache/P_CacheInternal.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/iocore/cache/P_CacheInternal.h?rev=1145431&r1=1145430&r2=1145431&view=diff
==============================================================================
--- trafficserver/traffic/trunk/iocore/cache/P_CacheInternal.h (original)
+++ trafficserver/traffic/trunk/iocore/cache/P_CacheInternal.h Tue Jul 12 02:23:13 2011
@@ -36,7 +36,7 @@ struct EvacuationBlock;
 
 // Compilation Options
 
-//#define HIT_EVACUATE                    1
+#define HIT_EVACUATE                    1
 #define ALTERNATES                      1
 // #define CACHE_LOCK_FAIL_RATE         0.001
 // #define CACHE_AGG_FAIL_RATE          0.005

Modified: trafficserver/traffic/trunk/mgmt/RecordsConfig.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/mgmt/RecordsConfig.cc?rev=1145431&r1=1145430&r2=1145431&view=diff
==============================================================================
--- trafficserver/traffic/trunk/mgmt/RecordsConfig.cc (original)
+++ trafficserver/traffic/trunk/mgmt/RecordsConfig.cc Tue Jul 12 02:23:13 2011
@@ -918,7 +918,15 @@ RecordElement RecordsConfig[] = {
   ,
   {RECT_CONFIG, "proxy.config.cluster.cluster_load_exceed_duration", RECD_INT, "4", RECU_NULL,
RR_NULL, RECC_NULL, NULL, RECA_NULL}
   ,
-
+  //##############################################################################
+  //#
+  //# HIT_EVACUATE
+  //#
+  //##############################################################################
+  {RECT_CONFIG, "proxy.config.cache.hit_evacuate_percent", RECD_INT, "0", RECU_RESTART_TS,
RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  ,
+  {RECT_CONFIG, "proxy.config.cache.hit_evacuate_size_limit", RECD_INT, "0", RECU_RESTART_TS,
RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  ,
   //##############################################################################
   //#
   //# Cache



Mime
View raw message