Memory Backend TTL doesn't work

Alex Moore amoore at basho.com
Mon Oct 14 08:35:26 EDT 2013


Hi Chan,

Instead of:
{storage_backend, riak_kv_memory_backend}, 
{memory_backend, [ 
{max_memory, 8192}, 
{ttl, 1} 
]}, 


Try:

        {multi_backend_default, <<"expiring_memory_backend">>},
        {multi_backend, [
            {<<"expiring_memory_backend">>,  riak_kv_memory_backend, [
                {max_memory, 8192}, %% 8GB
                {ttl, 1}
            ]}
        ]},
Also, for future reference, the max_memory field is in MB per vnode, so your current setting is 8GB per vnode.  Unless you have a ridiculous amount of RAM, you might want to reduce that setting a bit :)

Thanks, 

Alex

-- 
Alex Moore
Sent with Airmail

On October 14, 2013 at 7:32:03 AM, 성동찬_Chan (chan at kakao.com) wrote:

Hi~! 

I'm checking riak to use as a cache like memcached. 
But I found some strange situation. 
I set "ttl" like this to expire data, but failed. 
--------------------------------------------- 
{riak_kv, [ 
... 
{storage_backend, riak_kv_memory_backend}, 
{memory_backend, [ 
{max_memory, 8192}, 
{ttl, 1} 
]}, 
... 
]}, 

--------------------------------------------- 

TTL isn't supported on riak_kv_memory_backend? 
I changed riak_kv_memory_backend to riak_kv_bitcask_backend, that's fine. 

Thanks. 
Chan. 
_______________________________________________ 
riak-users mailing list 
riak-users at lists.basho.com 
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.basho.com/pipermail/riak-users_lists.basho.com/attachments/20131014/b5b1c80d/attachment.html>


More information about the riak-users mailing list