You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficserver.apache.org by "Leif Hedstrom (JIRA)" <ji...@apache.org> on 2016/08/15 22:49:20 UTC
[jira] [Comment Edited] (TS-2048) Only schedule
RamCacheCLFUSCompressor if feature is enabled
[ https://issues.apache.org/jira/browse/TS-2048?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15421816#comment-15421816 ]
Leif Hedstrom edited comment on TS-2048 at 8/15/16 10:48 PM:
-------------------------------------------------------------
Leif's patch that won't compile:
{code}
diff --git a/iocore/cache/RamCacheCLFUS.cc b/iocore/cache/RamCacheCLFUS.cc
index 3f87532..bfce6a5 100644
--- a/iocore/cache/RamCacheCLFUS.cc
+++ b/iocore/cache/RamCacheCLFUS.cc
@@ -211,7 +211,9 @@ RamCacheCLFUS::init(int64_t abytes, Vol *avol)
if (!max_bytes)
return;
resize_hashtable();
- eventProcessor.schedule_every(new RamCacheCLFUSCompressor(this), HRTIME_SECOND, ET_TASK);
+ if (cache_config_ram_cache_compress) {
+ eventProcessor.schedule_every(new RamCacheCLFUSCompressor(this), HRTIME_SECOND, ET_TASK);
+ }
}
{code}
Now it compiles.
was (Author: bcall):
Leif's patch that won't compile:
{code}
diff --git a/iocore/cache/RamCacheCLFUS.cc b/iocore/cache/RamCacheCLFUS.cc
index 3f87532..bfce6a5 100644
--- a/iocore/cache/RamCacheCLFUS.cc
+++ b/iocore/cache/RamCacheCLFUS.cc
@@ -211,7 +211,9 @@ RamCacheCLFUS::init(int64_t abytes, Vol *avol)
if (!max_bytes)
return;
resize_hashtable();
- eventProcessor.schedule_every(new RamCacheCLFUSCompressor(this), HRTIME_SECOND, ET_TASK);
+ If (cache_config_ram_cache_compress) {
+ eventProcessor.schedule_every(new RamCacheCLFUSCompressor(this), HRTIME_SECOND, ET_TASK);
+ }
}
{code}
> Only schedule RamCacheCLFUSCompressor if feature is enabled
> -----------------------------------------------------------
>
> Key: TS-2048
> URL: https://issues.apache.org/jira/browse/TS-2048
> Project: Traffic Server
> Issue Type: Improvement
> Components: Cache
> Reporter: Phil Sorber
> Assignee: Leif Hedstrom
> Priority: Minor
> Fix For: 7.0.0
>
>
> To do this we need to be able to schedule it if the feature is subsequently enabled via traffic_line -x and also need to store the Event so that we can disable it if it's disabled via traffic_line -x.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)