Not able to store data in original riak bucket

Luke Bakken lbakken at basho.com
Sat Oct 11 11:18:56 EDT 2014


Hi Ayush,

Please email me the output of "riak-debug" from this node.
--
Luke Bakken
Engineer / CSE
lbakken at basho.com


On Fri, Oct 10, 2014 at 9:46 PM, ayush mishra <ayushmishra2005 at gmail.com> wrote:
> This is related to precommit hook.
>
>
> When I hit below command for both buckets abc-client and abc-client1:-
>
> curl  http://127.0.0.1:8098/riak/abc-client
>
> {"props":{"allow_mult":false,"basic_quorum":false,"big_vclock":50,"chash_keyfun":{"mod":"riak_core_util","fun":"chash_std_keyfun"},"dvv_enabled":false,"dw":"quorum","last_write_wins":false,"linkfun":{"mod":"riak_kv_wm_link_walker","fun":"mapreduce_linkfun"},"n_val":3,"name":"abc-client","notfound_ok":true,"old_vclock":86400,"postcommit":[],"pr":0,"precommit":[{"mod":"riak_search_kv_hook","fun":"precommit"}],"pw":0,"r":"quorum","rw":"quorum","search":true,"small_vclock":50,"w":"quorum","young_vclock":20}}
>
> curl  http://127.0.0.1:8098/riak/abc-client1
>
> {"props":{"allow_mult":false,"basic_quorum":false,"big_vclock":50,"chash_keyfun":{"mod":"riak_core_util","fun":"chash_std_keyfun"},"dvv_enabled":false,"dw":"quorum","last_write_wins":false,"linkfun":{"mod":"riak_kv_wm_link_walker","fun":"mapreduce_linkfun"},"n_val":3,"name":"abc-client1","notfound_ok":true,"old_vclock":86400,"postcommit":[],"pr":0,"precommit":[],"pw":0,"r":"quorum","rw":"quorum","search":false,"small_vclock":50,"w":"quorum","young_vclock":20}}
>
> I tried to remove precommit hook by below command:-
>
> curl http://127.0.0.1:8098/riak/abc-client -X PUT -H "Content-Type:
> application/json" -d '{"props":{"precommit":[]}}'
>
>
> curl  http://127.0.0.1:8098/riak/abc-client
>
>
> {"props":{"allow_mult":false,"basic_quorum":false,"big_vclock":50,"chash_keyfun":{"mod":"riak_core_util","fun":"chash_std_keyfun"},"dvv_enabled":false,"dw":"quorum","last_write_wins":false,"linkfun":{"mod":"riak_kv_wm_link_walker","fun":"mapreduce_linkfun"},"n_val":3,"name":"abc-client","notfound_ok":true,"old_vclock":86400,"postcommit":[],"pr":0,"precommit":[],"pw":0,"r":"quorum","rw":"quorum","search":false,"small_vclock":50,"w":"quorum","young_vclock":20}}
>
>
> Now When I executed my code again, I again got same problem for abc-client.
> It again added precommit in abc-client.
>
> curl  http://127.0.0.1:8098/riak/abc-client
>
> {"props":{"allow_mult":false,"basic_quorum":false,"big_vclock":50,"chash_keyfun":{"mod":"riak_core_util","fun":"chash_std_keyfun"},"dvv_enabled":false,"dw":"quorum","last_write_wins":false,"linkfun":{"mod":"riak_kv_wm_link_walker","fun":"mapreduce_linkfun"},"n_val":3,"name":"abc-client","notfound_ok":true,"old_vclock":86400,"postcommit":[],"pr":0,"precommit":[{"mod":"riak_search_kv_hook","fun":"precommit"}],"pw":0,"r":"quorum","rw":"quorum","search":true,"small_vclock":50,"w":"quorum","young_vclock":20}}
>
> However it was still successfully storing data in abc-client1.
>
> I am not able to understand root cause. Could you please let me know how to
> stop adding precommit property in bucket.
>
>
> Thanks
>
>
>
>
>
> On Sat, Oct 11, 2014 at 9:10 AM, ayush mishra <ayushmishra2005 at gmail.com>
> wrote:
>>
>> Hi Luke,
>>
>> Here is some part of source code:-
>>
>> val bucketName = "abc-client" client.createBucket(bucketName).execute()
>> val abc = new ABC(id, "abc")
>> val bucket = client.fetchBucket(bucketName).execute()
>> bucket.store(abc).execute()
>>
>>
>> I don't think that I am using Riak Search. From the error log, it
>> looks like there is a precommit hook defined in the properties for
>> abc-client. Because  I also tried to  uninstall and install riak two
>> times, but got same problem.
>>
>>
>>
>> Is there any way to remove precommit hook?
>>
>> On Sat, Oct 11, 2014 at 4:28 AM, Luke Bakken <lbakken at basho.com> wrote:
>> > Ayush,
>> >
>> > Are you using Riak Search? If so, are you using legacy search (1.0) or
>> > Yokozuna (2.0) ?
>> >
>> > Could you please execute the store operation to the abc-client bucket
>> > using curl instead of the Java client?
>> > --
>> > Luke Bakken
>> > Engineer / CSE
>> > lbakken at basho.com
>> >
>> >
>> > On Fri, Oct 10, 2014 at 10:25 AM, ayush mishra
>> > <ayushmishra2005 at gmail.com> wrote:
>> >> I have installed riak 2.0.1 on my machine. I am trying to store an
>> >> object with a key in riak bucket. But I am stuck in a weird problem.
>> >>
>> >> My actual bucket name is "abc-client".
>> >>
>> >> When I try to save data in this bucket, I am getting below error on
>> >> console:
>> >>
>> >> [error] ! step error
>> >> [error]   RiakRetryFailedException:
>> >> com.basho.riak.client.http.response.RiakResponseRuntimeException:
>> >> <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]     {error,badarg,
>> >> [error]         [{erlang,iolist_to_binary,
>> >> [error]
>> >> [{hook_crashed,{riak_search_kv_hook,precommit,error,badarg}}],
>> >> [error]              []},
>> >> [error]
>> >> {wrq,append_to_response_body,2,[{file,"src/wrq.erl"},{line,215}]},
>> >> [error]          {riak_kv_wm_object,handle_common_error,3,
>> >> [error]              [{file,"src/riak_kv_wm_object.erl"},{line,1144}]},
>> >> [error]          {webmachine_resource,resource_call,3,
>> >> [error]
>> >> [{file,"src/webmachine_resource.erl"},{line,186}]},
>> >> [error]          {webmachine_resource,do,3,
>> >> [error]
>> >> [{file,"src/webmachine_resource.erl"},{line,142}]},
>> >> [error]          {webmachine_decision_core,resource_call,1,
>> >> [error]
>> >> [{file,"src/webmachine_decision_core.erl"},{line,48}]},
>> >> [error]          {webmachine_decision_core,accept_helper,1,
>> >> [error]
>> >> [{file,"src/webmachine_decision_core.erl"},{line,612}]},
>> >> [error]          {webmachine_decision_core,decision,1,
>> >> [error]
>> >>
>> >> [{file,"src/webmachine_decision_core.erl"},{line,580}]}]}}</pre><P><HR><ADDRESS>mochiweb+webmachine
>> >> web server</ADDRESS></body></html> (DefaultRetrier.java:81)
>> >> [error]
>> >> com.basho.riak.client.cap.DefaultRetrier.attempt(DefaultRetrier.java:79)
>> >> [error]
>> >> com.basho.riak.client.cap.DefaultRetrier.attempt(DefaultRetrier.java:81)
>> >> [error]
>> >> com.basho.riak.client.cap.DefaultRetrier.attempt(DefaultRetrier.java:81)
>> >> [error]
>> >> com.basho.riak.client.cap.DefaultRetrier.attempt(DefaultRetrier.java:81)
>> >> [error]
>> >> com.basho.riak.client.cap.DefaultRetrier.attempt(DefaultRetrier.java:53)
>> >> [error]
>> >> com.basho.riak.client.operations.StoreObject.execute(StoreObject.java:148)
>> >>
>> >> But When I change bucket name from "abc-client" to "abc-client1", I am
>> >> able to store data successfully.
>> >>
>> >> Can anyone help me to resolve this? Thanks in advance
>> >>
>> >> _______________________________________________
>> >> riak-users mailing list
>> >> riak-users at lists.basho.com
>> >> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>
>




More information about the riak-users mailing list