Can Bitcask expiry_secs vary between backends?

Toby Corkindale toby.corkindale at strategicdata.com.au
Thu Apr 4 22:39:08 EDT 2013


On 04/04/13 17:43, Toby Corkindale wrote:
> Hi,
> Can we set Bitcask's expiry_secs value to be different per backend, in a
> Multi-backend scenario?
>
> Eg.
>
> {multi_backend, [
>      {<<"bitcask_short_ttl">>,  riak_kv_bitcask_backend, [
>          {expiry_secs, 3600},       %% Expire items after one hour
>          {expiry_grace_time, 600}
>      ]},
>      {<<"bitcask_long_ttl">>,  riak_kv_bitcask_backend, [
>          {expiry_secs, 86400},       %% Expire items after one day
>          {expiry_grace_time, 3600}
>      ]},
>      {<<"eleveldb_mult">>, riak_kv_eleveldb_backend, [
>      ]}
> ]},
>
>
> And if we're re-using bitcask in this way, do we need to specify
> anything else, such as different data directories per backend?


Answering my own question here, but..
Experimentation seems to indicate that
a) You can set different expiry periods per bitcask backend.
b) You must set a unique data_dir for each backend, or else
everything crashes after a while.

-Toby





More information about the riak-users mailing list