basho / riak-java-client

The Riak client for Java.
Apache License 2.0
267 stars 158 forks source link

If last_write_wins is true, dvv_enabled must be false [JIRA: CLIENTS-849] #620

Open gmenard opened 8 years ago

gmenard commented 8 years ago

There is currently no way to change the property "dvv_enabled" for a Bucket. When I set the "last_write_wins" property to true, the following error is thrown:

Invalid bucket properties: [{dvv_enabled, "If last_write_wins is true, dvv_enabled must be false"}]

It would be nice to have a withDVV method in StoreBucketProperties.Builder so that we can disable the DVV: new StoreBucketProperties.Builder(namespace) .withLastWriteWins(true) .withDVV(false) .build(); I am using the version 2.0.4.

Thanks!

alexmoore commented 8 years ago

Hi Guillaume,

Our PB interface doesn't currently have the capability for the dvv bucket property (https://github.com/basho/riak_pb/blob/develop/src/riak.proto#L108-L160), so I'll create an issue for that.
After we get that in we can look into adding it to the Java client.

A workaround would be to set that property through the HTTP api, or to set it at the bucket-type level through the command line.

Thanks, Alex

Related: https://github.com/basho/riak-go-client/issues/64

gmenard commented 8 years ago

Thanks, Alex!