Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Critical
-
Resolution: Unresolved
-
Affects Version/s: 1.8.0, 1.8.1, 2.0, 2.0.1, 2.0.2
-
Fix Version/s: 2.1
-
Component/s: RESTful-APIs
-
Security Level: Public
-
Labels:None
Description
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).
Eg:
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.
Eg:
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.
Activity
- All
- Comments
- Work Log
- History
- Activity
- Gerrit Reviews
<rnentry type="knownissue">
<version ver="2.0.0m"/>
<class id="db"/>
<issue type="cb" ref="MB-7897"/>
<rntext>
<para>
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>.
</para>
</rntext>
</rnentry>