[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
|Affects Version/s:||1.8.0, 1.8.1, 2.0, 2.0.1, 2.1.0|
|Reporter:||Trond Norbye||Assignee:||Aleksey Kondratenko|
|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("192.168.0.97", "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:|
<issue type="cb" ref="
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.|