Shouldn't precommit body show up in cluster-info first before we try to
test it with an object? I just set the precommit hook for test_kv bucket
type which has no custom property set. Curl on props shows precommit, but
cluster-info doesn't (took another dump after 5 minutes of precommit hook
creation). No sasl logging is triggered either though the debug mode is on.

Curl output for test_kv props:
>
>

> $ curl localhost:8098/types/test_kv/props
>
> {"props":{"active":true,"allow_mult":true,"basic_quorum":false,"big_vclock":50,"chash_keyfun":{"mod":"riak_core_util","fun":"chash_std_keyfun"},"claimant":"
> riak1@127.0.0.1
> ","dvv_enabled":true,"dw":"quorum","last_write_wins":false,"linkfun":{"mod":"riak_kv_wm_link_walker","fun":"mapreduce_linkfun"},"n_val":3,"notfound_ok":true,"old_vclock":86400,"postcommit":[],"pr":0,"precommit":[{"mod":"rtriggers","fun":"pre_all"}],"pw":0,"r":"quorum","rw":"quorum","small_vclock":50,"w":"quorum","young_vclock":20}}




Cluster-info dump after setting the props - precommit body is still empty
in the cluster-info for test_kv bucket type:


> grep -A15 test_kv cluster_info.txt |grep precommit
>         {*precommit*,[]},
>         {*precommit*,[]},
>         {*precommit*,[]},
>         {*precommit*,[]},
>         {*precommit*,[]},
>         {*precommit*,[]},
>         {*precommit*,[]},
>         {*precommit*,[]},
>         {*precommit*,[]},
>         {*precommit*,[]},
>         {*precommit*,[]},
>         {*precommit*,[]},


On Mon, May 16, 2016 at 10:48 AM, Luke Bakken <lbak...@basho.com> wrote:

> Hi Sanket,
>
> Thanks for providing that information, this is the first time that the
> "write_once" bucket type property was mentioned.
>
> If you set the precommit hook on a different bucket type where there
> are *no other* custom bucket type properties set, does the precommit
> hook run successfully?
>
> --
> Luke Bakken
> Engineer
> lbak...@basho.com
>
> On Mon, May 16, 2016 at 7:17 AM, Sanket Agrawal
> <sanket.agra...@gmail.com> wrote:
> > Hi Luke,
> >
> > More on the precommit hook debugging I just did - I might have a handle
> on
> > what the problem is. I took a cluster-info dump for all the nodes in the
> > cluster. In the dump, precommit is set to [] for all the buckets in the
> > cluster. The reason for that seems to be that the bucket type with
> > "write-once" property where precommit hook is set, is not in the cluster
> > somehow!
> >
> > The bucket type name is "test_kv_wo". Let us grep for it in
> cluster_info.txt
> > - it doesn't show up at all (another bucket type "test_kv" shows up
> > instead):
> >>
> >> $ grep test_kv cluster_info.txt | sort -u
> >>     [[{bucket,&lt;&lt;"test_kv">>}|
> >>         {name,&lt;&lt;"test_kv">>},
> >
> >
> > Now, let us verify we can get the props for the bucket type fine from
> curl:
> >>
> >> $ curl localhost:8098/types/test_kv_wo/buckets/uuid_log/props:
> >>
> >>
> {"props":{"name":"uuid_log","active":true,"allow_mult":true,"basic_quorum":false,"big_vclock":50,"chash_keyfun":{"mod":"riak_core_util","fun":"chash_std_keyfun"},"claimant":"
> riak1@127.0.0.1
> ","dvv_enabled":true,"dw":"quorum","last_write_wins":false,"linkfun":{"mod":"riak_kv_wm_link_walker","fun":"mapreduce_linkfun"},"n_val":3,"name":"uuid_log","notfound_ok":true,"old_vclock":86400,"postcommit":[],"pr":0,"precommit":[{"mod":"rtriggers","fun":"pre_uuid"}],"pw":0,"r":"quorum","rw":"quorum","small_vclock":50,"w":"quorum","write_once":true,"young_vclock":20}}
> >
> >
> >
> > So, the problem might be missing bucket types in the cluster since they
> > don't show up in cluster-info at all? The same thing happens with LWW
> bucket
> > type that I created, test_kv_lww. It doesn't show up either. CRDT bucket
> > types show up fine.
>
_______________________________________________
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

Reply via email to