-
Notifications
You must be signed in to change notification settings - Fork 190
Closed as not planned
Labels
Description
From this email thread, with regard to the multi backend documentation:
Trying to use the memory backend via multi.
What I did inriak.conf
:storage_backend = multi
Then creating a bucket type:
riak-admin bucket-type create os_cache '{"props": {"write_once": true,"backend":"memory","n_val":2,"r":1,"w":1,"dw":1}}' riak-admin bucket-type activate os_cache
Then I PUT an object:
curl -v -XPUT -H "Content-Type: application/octet-stream" 'http://localhost:8098/types/os_cache/buckets/os_cache/keys/test1' -d 'test'
Next, I shut down all of the servers at once, leaving nothing in the cluster, then restarting them. And a new get for the above URL returns "test".
When I set storage_backend to memory, it works as expected, after a full cluster stop, the bucket is empty.
Here is a configuration that could have been used, that would create two backends, one using memory that is called my_memory_backend
, and one using leveldb that is called my_leveldb_backend
:
storage_backend = multi
multi_backend.my_memory_backend.storage_backend = memory
multi_backend.my_leveldb_backend.storage_backend = leveldb
Then, the rest of the configuration is as follows:
riak-admin bucket-type create os_cache '{"props": {"write_once": true,"backend":"my_memory_backend","n_val":2,"r":1,"w":1,"dw":1}}'
riak-admin bucket-type activate os_cache
This is somewhat related to issue #1548