Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-7897

[Done- RN 2.0.2] Modify a bucket resets unspecified values to the default value

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Won't Fix
    • Affects Version/s: 1.8.0, 1.8.1, 2.0, 2.0.1, 2.1.0
    • Fix Version/s: 3.0
    • 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.

      No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

        trond Trond Norbye created issue -
        mikew Mike Wiederhold made changes -
        Field Original Value New Value
        Component/s RESTful-APIs [ 10017 ]
        maria Maria McDuff (Inactive) made changes -
        Fix Version/s 2.0.2 [ 10418 ]
        maria Maria McDuff (Inactive) made changes -
        Assignee Aleksey Kondratenko [ alkondratenko ]
        maria Maria McDuff (Inactive) made changes -
        Fix Version/s 2.1 [ 10414 ]
        Fix Version/s 2.0.2 [ 10418 ]
        maria Maria McDuff (Inactive) made changes -
        Affects Version/s 2.0.1 [ 10399 ]
        Affects Version/s 2.0.2 [ 10418 ]
        maria Maria McDuff (Inactive) made changes -
        Summary Modify a bucket resets unspecified values to the default value [RN 2.0.2] Modify a bucket resets unspecified values to the default value
        maria Maria McDuff (Inactive) made changes -
        Priority Major [ 3 ] Critical [ 2 ]
        wayne Wayne Siu made changes -
        Component/s documentation [ 10012 ]
        Hide
        kzeller kzeller added a comment -

        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"/>

        <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>

        Show
        kzeller kzeller added a comment - 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 "/> <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>
        kzeller kzeller made changes -
        Summary [RN 2.0.2] Modify a bucket resets unspecified values to the default value [Done- RN 2.0.2] Modify a bucket resets unspecified values to the default value
        Component/s documentation [ 10012 ]
        Hide
        alkondratenko Aleksey Kondratenko (Inactive) added a comment -

        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.

        Show
        alkondratenko Aleksey Kondratenko (Inactive) added a comment - 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.
        alkondratenko Aleksey Kondratenko (Inactive) made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Won't Fix [ 2 ]

          People

          • Assignee:
            alkondratenko Aleksey Kondratenko (Inactive)
            Reporter:
            trond Trond Norbye
          • Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Gerrit Reviews

              There are no open Gerrit changes