[MB-7897] [Done- RN 2.0.2] Modify a bucket resets unspecified values to the default value Created: 12/Mar/13  Updated: 20/Jun/13  Resolved: 20/Jun/13

Status: Resolved
Project: Couchbase Server
Component/s: RESTful-APIs
Affects Version/s: 1.8.0, 1.8.1, 2.0, 2.0.1, 2.1.0
Fix Version/s: 3.0
Security Level: Public

Type: Bug Priority: Critical
Reporter: Trond Norbye Assignee: Aleksey Kondratenko
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

All values omitted in a modify request for a bucket is reset to their default value. Most users won't find it natural to first go get the bucket properties before toggling their value before setting it (if they want to lets say just enable flush for a bucket).


As a user I would expect to be able to do something like this (by using the php api):

$cb = new CouchbaseClusterManager("", "Administrator", "asdasd");
$cb->modifyBucket("default", array("enable flush" => 1));

Instead we force the user to grab the properties first, and then send the entire set back with their modification.

In theory we could do this "under the cover" in the API's, but that will add complexity in the clients (if they're running in an async environment etc). Sending the full config back and forth is just unneeded overhead.

Comment by kzeller [ 23/Apr/13 ]
Added to 2.0.2. Release Notes as:

<rnentry type="knownissue">

<version ver="2.0.0m"/>

<class id="db"/>

<issue type="cb" ref="MB-7897"/>


If you edit a data bucket using the REST-API and you do not provide existing values for bucket properties, the server may reset existing
bucket properties to the default value. To avoid this situation you should specify all existing bucket properties as well as the update property as parameters
when you make this REST request. For more information, see <ulink url="http://www.couchbase.com/docs/couchbase-manual-2.0/couchbase-admin-restapi-creating-buckets.html">
Couchbase Manual, Creating and Editing Data Buckets</ulink>.


Comment by Aleksey Kondratenko [ 20/Jun/13 ]
updating some fields without even checking it's _same_ bucket instance is IMHO bad idea. We'll instead provide some way to CAS full bucket configuration.
Generated at Fri Nov 21 18:37:10 CST 2014 using JIRA 5.2.4#845-sha1:c9f4cc41abe72fb236945343a1f485c2c844dac9.