Trouble with v0.9.1 single instance

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Trouble with v0.9.1 single instance

Mårten Gustafson
I've done a clean install of Riak 0.9.1 on Mac OS X 10.6.2 (Snow
Leopard). I'm using the Innostore backend (see attached conf). I start
the instance and can query the bucket without any trouble:

{"props":{"name":"test","allow_mult":false,"big_vclock":50,"chash_keyfun":{"mod":"riak_util","fun":"chash_std_keyfun"},"linkfun":{"mod":"raw_link_walker_resource","fun":"mapreduce_linkfun"},"n_val":1,"old_vclock":86400,"small_vclock":10,"young_vclock":20},"keys":[]}

I then do a PUT to /riak/test/first with the JSON payload {"first":1}
which causes the client to pause for quite a long time and then
report:

webmachine error: path="/riak/test/first"
[{webmachine_decision_core,'-choose_encoding/1-lc$^0/1-0-',
     [{error,
          {error,
              {case_clause,{error,timeout}},
              [{raw_http_resource,encodings_provided,2},
               {webmachine_resource,resource_call,3},
               {webmachine_resource,do,3},
               {webmachine_decision_core,resource_call,1},
               {webmachine_decision_core,choose_encoding,1},
               {webmachine_decision_core,decision,1},
               {webmachine_decision_core,handle_request,2},
               {webmachine_mochiweb,loop,1}]}}]},
 {webmachine_decision_core,choose_encoding,1},
 {webmachine_decision_core,decision,1},
 {webmachine_decision_core,handle_request,2},
 {webmachine_mochiweb,loop,1},
 {mochiweb_http,headers,5},
 {proc_lib,init_p_do_apply,3}]


If I query the bucket again the key shows up:

{"props":{"name":"test","allow_mult":false,"big_vclock":50,"chash_keyfun":{"mod":"riak_util","fun":"chash_std_keyfun"},"linkfun":{"mod":"raw_link_walker_resource","fun":"mapreduce_linkfun"},"n_val":1,"old_vclock":86400,"small_vclock":10,"young_vclock":20},"keys":["first"]}

Any attempt to do a GET on the key hangs for a while and then returns
the following webmachine error:

webmachine error: path="/riak/test/first"
[{webmachine_decision_core,'-decision/1-lc$^1/1-1-',
     [{error,
          {error,
              {case_clause,{error,timeout}},
              [{raw_http_resource,content_types_provided,2},
               {webmachine_resource,resource_call,3},
               {webmachine_resource,do,3},
               {webmachine_decision_core,resource_call,1},
               {webmachine_decision_core,decision,1},
               {webmachine_decision_core,handle_request,2},
               {webmachine_mochiweb,loop,1},
               {mochiweb_http,headers,5}]}}]},
 {webmachine_decision_core,decision,1},
 {webmachine_decision_core,handle_request,2},
 {webmachine_mochiweb,loop,1},
 {mochiweb_http,headers,5},
 {proc_lib,init_p_do_apply,3}]


Any ideas?



/mårten.

_______________________________________________
riak-users mailing list
[hidden email]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

app.config (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Trouble with v0.9.1 single instance

Kevin Smith-5
Marten -

Thanks for the detailed error report. We have isolated a bug in the HTTP API where the error tuple {error, timeout} isn't handled correctly in all cases. I'll be fixing that later today. However, it doesn't explain why you're getting timeouts when saving or reading bucket entries. To narrow down the problem, would you mind performing the following and send me the results?

1) Start your Riak server either via bin/riak console or bin/riak start

2) Open the server's console. If you started riak with the 'console' option then the console will open automatically. If you used 'start', then you'll need to use 'bin/riak attach' to attach to the server and open a console.

3) In the console issue the following commands. Don't forget to type periods at the end of the commands as they are significant in Erlang:

{ok, C}  = riak:local_client().
C:get(<<"test">>, <<"first">>, 1).

If everything is configured correctly and that bucket/key entry doesn't exist you should see the tuple {error, notfound}.

Thanks,
Kevin
On Mar 17, 2010, at 8:50 AM, Mårten Gustafson wrote:

> I've done a clean install of Riak 0.9.1 on Mac OS X 10.6.2 (Snow
> Leopard). I'm using the Innostore backend (see attached conf). I start
> the instance and can query the bucket without any trouble:
>
> {"props":{"name":"test","allow_mult":false,"big_vclock":50,"chash_keyfun":{"mod":"riak_util","fun":"chash_std_keyfun"},"linkfun":{"mod":"raw_link_walker_resource","fun":"mapreduce_linkfun"},"n_val":1,"old_vclock":86400,"small_vclock":10,"young_vclock":20},"keys":[]}
>
> I then do a PUT to /riak/test/first with the JSON payload {"first":1}
> which causes the client to pause for quite a long time and then
> report:
>
> webmachine error: path="/riak/test/first"
> [{webmachine_decision_core,'-choose_encoding/1-lc$^0/1-0-',
>     [{error,
>          {error,
>              {case_clause,{error,timeout}},
>              [{raw_http_resource,encodings_provided,2},
>               {webmachine_resource,resource_call,3},
>               {webmachine_resource,do,3},
>               {webmachine_decision_core,resource_call,1},
>               {webmachine_decision_core,choose_encoding,1},
>               {webmachine_decision_core,decision,1},
>               {webmachine_decision_core,handle_request,2},
>               {webmachine_mochiweb,loop,1}]}}]},
> {webmachine_decision_core,choose_encoding,1},
> {webmachine_decision_core,decision,1},
> {webmachine_decision_core,handle_request,2},
> {webmachine_mochiweb,loop,1},
> {mochiweb_http,headers,5},
> {proc_lib,init_p_do_apply,3}]
>
>
> If I query the bucket again the key shows up:
>
> {"props":{"name":"test","allow_mult":false,"big_vclock":50,"chash_keyfun":{"mod":"riak_util","fun":"chash_std_keyfun"},"linkfun":{"mod":"raw_link_walker_resource","fun":"mapreduce_linkfun"},"n_val":1,"old_vclock":86400,"small_vclock":10,"young_vclock":20},"keys":["first"]}
>
> Any attempt to do a GET on the key hangs for a while and then returns
> the following webmachine error:
>
> webmachine error: path="/riak/test/first"
> [{webmachine_decision_core,'-decision/1-lc$^1/1-1-',
>     [{error,
>          {error,
>              {case_clause,{error,timeout}},
>              [{raw_http_resource,content_types_provided,2},
>               {webmachine_resource,resource_call,3},
>               {webmachine_resource,do,3},
>               {webmachine_decision_core,resource_call,1},
>               {webmachine_decision_core,decision,1},
>               {webmachine_decision_core,handle_request,2},
>               {webmachine_mochiweb,loop,1},
>               {mochiweb_http,headers,5}]}}]},
> {webmachine_decision_core,decision,1},
> {webmachine_decision_core,handle_request,2},
> {webmachine_mochiweb,loop,1},
> {mochiweb_http,headers,5},
> {proc_lib,init_p_do_apply,3}]
>
>
> Any ideas?
>
>
>
> /mårten.
> <app.config>_______________________________________________
> riak-users mailing list
> [hidden email]
> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com


_______________________________________________
riak-users mailing list
[hidden email]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
Reply | Threaded
Open this post in threaded view
|

Re: Trouble with v0.9.1 single instance

Mårten Gustafson
On 17 March 2010 14:18, Kevin Smith <[hidden email]> wrote:
>
> {ok, C}  = riak:local_client().
> C:get(<<"test">>, <<"first">>, 1).
>
> If everything is configured correctly and that bucket/key entry doesn't exist you should see the tuple {error, notfound}.

I cleaned out the contents of data/ and ran the above and it correctly
returns: {error, notfound}.



/mårten.

_______________________________________________
riak-users mailing list
[hidden email]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
Reply | Threaded
Open this post in threaded view
|

Re: Trouble with v0.9.1 single instance

Mårten Gustafson
On 17 March 2010 14:36, Mårten Gustafson <[hidden email]> wrote:
> On 17 March 2010 14:18, Kevin Smith <[hidden email]> wrote:
>>
>> {ok, C}  = riak:local_client().
>> C:get(<<"test">>, <<"first">>, 1).
>>
>> If everything is configured correctly and that bucket/key entry doesn't exist you should see the tuple {error, notfound}.
>
> I cleaned out the contents of data/ and ran the above and it correctly
> returns: {error, notfound}.

Kevin and I've discussed this and it turned out that I got bitten by
the combination of n_val = 1 and the default values for r, w and dw.

Hence, nothing wrong with riak and if you're looking to test on a
single instance with a low n_val make sure you specify r, w and dw
accordingly when doing requests.



/mårten.

_______________________________________________
riak-users mailing list
[hidden email]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
Reply | Threaded
Open this post in threaded view
|

Re: Trouble with v0.9.1 single instance

John Lynch
Yeah, I've been bitten by this as well. Is there a reason why the default r/w/dw values for a query cant be adjusted by Riak so that they are never greater than the n_val of the bucket?  Or is that something you would expect the client libraries to do by querying the bucket props first and adjusting r/w/dw themselves?  

- John




On Wed, Mar 17, 2010 at 8:38 AM, Mårten Gustafson <[hidden email]> wrote:
On 17 March 2010 14:36, Mårten Gustafson <[hidden email]> wrote:
> On 17 March 2010 14:18, Kevin Smith <[hidden email]> wrote:
>>
>> {ok, C}  = riak:local_client().
>> C:get(<<"test">>, <<"first">>, 1).
>>
>> If everything is configured correctly and that bucket/key entry doesn't exist you should see the tuple {error, notfound}.
>
> I cleaned out the contents of data/ and ran the above and it correctly
> returns: {error, notfound}.

Kevin and I've discussed this and it turned out that I got bitten by
the combination of n_val = 1 and the default values for r, w and dw.

Hence, nothing wrong with riak and if you're looking to test on a
single instance with a low n_val make sure you specify r, w and dw
accordingly when doing requests.



/mårten.

_______________________________________________
riak-users mailing list
[hidden email]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com


_______________________________________________
riak-users mailing list
[hidden email]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com