We found the issue.  It turned out that the "storage_backend" setting is
still bitcask on all the node except the one I was testing on.  After
making sure all node have "storage_backend = multi", the secondary index
works as expected.  My bad, sorry for the noise :(

-Bora

On Thu, Aug 27, 2015 at 5:05 PM, Bora Kou <b...@zendesk.com> wrote:

> Hi,
>
> I am testing out riak kv multi backend with leveldb and bitcask.  I
> configured bitcask as the default backend and leveldb with bucket-type.  I
> am using riak kv version 2.0.5-1.
>
> I am able to do http PUT with index, but when I try to GET with the index,
> it give me "{error,{indexes_not_supported,riak_kv_bitcask_backend}}}"
>
> Am I missing something?  Is this type of setting supported?
>
> Here is the information:
>
> ## PUT (with index work fine)
> *curl -v -XPUT
> localhost:8098/types/xfiles/buckets/xfiles_master_aws_pod98/keys/john \*
> *  -H "x-riak-index-email_bin: j...@example.com <j...@example.com>" \*
> *  -d 'John Testing'*
>
> ** About to connect() to localhost port 8098 (#0)*
> **   Trying 127.0.0.1... connected*
> *> PUT /types/xfiles/buckets/xfiles_master_aws_pod98/keys/john HTTP/1.1*
> *> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0
> OpenSSL/1.0.1 zlib/1.2.3.4 <http://1.2.3.4> libidn/1.23 librtmp/2.3*
> *> Host: localhost:8098*
> *> Accept: */**
> *> x-riak-index-email_bin: j...@example.com <j...@example.com>*
> *> Content-Length: 12*
> *> Content-Type: application/x-www-form-urlencoded*
> *> *
> ** upload completely sent off: 12out of 12 bytes*
> *< HTTP/1.1 204 No Content*
> *< Vary: Accept-Encoding*
> *< Server: MochiWeb/1.1 WebMachine/1.10.5 (jokes are better explained)*
> *< Date: Thu, 27 Aug 2015 23:32:20 GMT*
> *< Content-Type: application/x-www-form-urlencoded*
> *< Content-Length: 0*
> *< *
> ** Connection #0 to host localhost left intact*
> ** Closing connection #0*
>
> ## GET INDEX (got error)
> *curl -v
> localhost:8098/types/xfiles/buckets/xfiles_master_aws_pod98/index/email_bin/j...@example.com
> <j...@example.com>*
>
> ** About to connect() to localhost port 8098 (#0)*
> **   Trying 127.0.0.1... connected*
> *> GET
> /types/xfiles/buckets/xfiles_master_aws_pod98/index/email_bin/j...@example.com
> <j...@example.com> HTTP/1.1*
> *> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0
> OpenSSL/1.0.1 zlib/1.2.3.4 <http://1.2.3.4> libidn/1.23 librtmp/2.3*
> *> Host: localhost:8098*
> *> Accept: */**
> *> *
> *< HTTP/1.1 500 Internal Server Error*
> *< Vary: Accept-Encoding*
> *< Server: MochiWeb/1.1 WebMachine/1.10.5 (jokes are better explained)*
> *< Date: Thu, 27 Aug 2015 23:41:52 GMT*
> *< Content-Type: text/html*
> *< Content-Length: 305*
> *< *
> ** Connection #0 to host localhost left intact*
> ** Closing connection #0*
> *<html><head><title>500 Internal Server
> Error</title></head><body><h1>Internal Server Error</h1>The server
> encountered an error while processing this
> request:<br><pre>{error,{error,{indexes_not_supported,riak_kv_bitcask_backend}}}</pre><P><HR><ADDRESS>mochiweb+webmachine
> web server</ADDRESS></body></html>*
>
> ## GET THE KEY (work fine)
> *curl
> localhost:8098/types/xfiles/buckets/xfiles_master_aws_pod98/keys/john*
> *John Testing*
>
>
> ## BUCKET-TYPE
> *riak-admin bucket-type list*
> *default (active)*
> *xfiles (active)*
>
> *riak-admin bucket-type status xfiles*
> *xfiles is active*
>
> *active: true*
> *allow_mult: true*
> *backend: <<"leveldb_multi">>*
> *basic_quorum: false*
> *big_vclock: 50*
> *chash_keyfun: {riak_core_util,chash_std_keyfun}*
> *claimant: 'r...@riak-test1.example.com <r...@riak-test1.example.com>'*
> *dvv_enabled: true*
> *dw: quorum*
> *last_write_wins: false*
> *linkfun: {modfun,riak_kv_wm_link_walker,mapreduce_linkfun}*
> *n_val: 3*
> *notfound_ok: true*
> *old_vclock: 86400*
> *postcommit: []*
> *pr: 0*
> *precommit: []*
> *pw: 0*
> *r: quorum*
> *rw: quorum*
> *small_vclock: 50*
> *w: quorum*
> *young_vclock: 20*
>
>
> ## MY CONFIGURATION (6 nodes)
> *cat /etc/riak/riak.conf | grep multi*
> *storage_backend = multi*
> *multi_backend.bitcask_multi.storage_backend = bitcask*
> *multi_backend.bitcask_multi.bitcask.data_root = /var/lib/riak/bitcask*
> *multi_backend.leveldb_multi.storage_backend = leveldb*
> *multi_backend.leveldb_multi.leveldb.data_root = /var/lib/riak/leveldb*
> *multi_backend.leveldb_multi.leveldb.maximum_memory.percent = 30*
> *multi_backend.leveldb_multi.leveldb.compaction.trigger.tombstone_count =
> 1000*
> *multi_backend.default = bitcask_multi*
>
> *cat /var/lib/riak/generated.configs/* | grep multi*
> *      {storage_backend,riak_kv_multi_backend},*
> *      {multi_backend_default,<<"bitcask_multi">>},*
> *      {multi_backend,*
> *          [{<<"bitcask_multi">>,riak_kv_bitcask_backend,*
> *           {<<"leveldb_multi">>,riak_kv_eleveldb_backend,*
>
>
>
>
> Thank you,
>
>
> -Bora
>
>
>
_______________________________________________
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

Reply via email to