riak-search and innostore

Gordon Tillman gtillman at mezeo.com
Tue Feb 8 19:10:29 EST 2011

Greetings All,

I just have a couple of quick comments regarding using riak-search with innostore.  Thought it may save someone else a bit of trouble.

OK, starting with a standard dev install of riak-search (latest version).  I installed innostore and configured as per the wiki.  So I had the following lines in the app.config files of my 3 node development cluster:

{storage_backend, riak_kv_innostore_backend},
%% innostore config
{innostore, [
   {data_home_dir, "data/innodb"}, %% Where data files go
   {log_group_home_dir, "data/innodb"}, %% Where log files go
   {buffer_pool_size, 268435456} %% 256MB in-memory buffer in bytes

The cluster started up fine and I populated it with some initial data with no errors.  Found that I was unable to list keys in a bucket.  Did some poking around and found out that even though all of the proper riak_search and merge_index config was in place, the system had used innostore and not merge_index_backend for the indexes.

So I discovered that the right thing to do was to configure the cluster using:

{storage_backend, riak_kv_multi_backend},

And that brings me to my second note.  The wiki docs describe the configuration info needed to work with riak_kv_multi_backend.  An example:

           {multi_backend_default, <<"bitcask">>},
           {multi_backend, [
               {<<"bitcask">>, riak_kv_bitcask_backend,
                   [{data_root, "data/bitcask"}]},
               {<<"innostore">>, riak_kv_innostore_backend,
                       {data_home_dir, "data/innodb"},
                       {log_group_home_dir, "data/innodb"},
                       {buffer_pool_size, 268435456}

I found out that even though this info must be present, the system was not honoring my settings for <<"innostore">>. I know this because it was creating a different directory for the indexes in a different location than what I had specified. I still had to include this section (outside of the multi_backend block):

{innostore, [
   {data_home_dir, "data/innodb"}, %% Where data files go
   {log_group_home_dir, "data/innodb"}, %% Where log files go
   {buffer_pool_size, 268435456} %% 256MB in-memory buffer in bytes

With that declaration in place, all is working well.  The riak-search indexes are correct and functioning.  I can list bucket keys, and the information for the buckets whose "backend" property is set to "innostore" (via REST interface) is being correctly stored in the proper directory, etc.

More information about the riak-users mailing list