Duplicate bucket props r/w/dw/rw if set in app.config

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

Duplicate bucket props r/w/dw/rw if set in app.config

nfo
Hi. I try to change the default values for r,w,dw and rw, in app.config:

  {default_bucket_props, [{n_val, 2},{r, 1},{w, 1},{dw, 1},{rw, 1}]},

But when I look at the props of a bucket, r,w,dw and rw are present twice :

  {"props":{"name":"toto","n_val":2,"r":1,"w":1,"dw":1,"rw":1,"linkfun":{"mod":"riak_kv_wm_link_walker","fun":"mapreduce_linkfun"},"old_vclock":86400,"young_vclock":20,"big_vclock":50,"small_vclock":10,"r":"quorum","w":"quorum","dw":"quorum","rw":"quorum"}}

I use riak search 0.14.0. Bug ?

Nicolas

_______________________________________________
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: Duplicate bucket props r/w/dw/rw if set in app.config

Scott Lystig Fritchie-2
Nicolas Fouché <[hidden email]> wrote:

nf> [...] But when I look at the props of a bucket, r,w,dw and rw are present
nf> twice :
nf> [...]

nf> I use riak search 0.14.0. Bug ?

Feature.  Erlang property lists take the first element in the list that
matches the property name.

On the other hand, I don't know what JavaScript will do with an object
that's got the same member name twice, or if different JS interpreters
handle that differently.  To avoid hassles there, when setting your
bucket property, you could delete the old values of 'r', 'w', et
al. before prepending your new values onto the list.

-Scott

_______________________________________________
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: Duplicate bucket props r/w/dw/rw if set in app.config

Bob Ippolito
On Tue, May 10, 2011 at 11:24 AM, Scott Lystig Fritchie
<[hidden email]> wrote:

> Nicolas Fouché <[hidden email]> wrote:
>
> nf> [...] But when I look at the props of a bucket, r,w,dw and rw are present
> nf> twice :
> nf> [...]
>
> nf> I use riak search 0.14.0. Bug ?
>
> Feature.  Erlang property lists take the first element in the list that
> matches the property name.

Yeah, but it's a bug if you encode it in JSON this way.

-bob

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