Details

    • New Feature
    • Resolution: Fixed
    • Major
    • 3.2.4
    • None
    • library

    Description

      The library should ignore unknown attributes for ErrorMap v2.

      KV engine added new attributes and bumped error map version here:
      https://github.com/couchbase/kv_engine/commit/5d1a62e1493537a922b08bd29351826986fadd04

      diff --git a/docs/ErrorMap.md b/docs/ErrorMap.md
      index d437841774..df945f5c52 100644
      --- a/docs/ErrorMap.md
      +++ b/docs/ErrorMap.md
      @@ -41,8 +41,10 @@ to their extended information. The top-level format of the file is:
       
       * `version` is the current error map format. The error map is versioned
         in case the file format changes in the future, so that clients can request
      -  a version they can understand. There is currently only one version, which is
      -  `1`
      +  a version they can understand. There is currently two versions, 1 and 2.
      +  The difference between version one and two is that two allows for new
      +  attributes specified in the `attrs` section for an error code. Clients
      +  *MUST* ignore unknown attributes.
       * `revision` is the revision of the error map. The revision is incremented
         whenever a new error code is added. Clients can use this to compare error
         maps from different servers and select the map with the highest revision
      @@ -62,7 +64,8 @@ to their extended information. The top-level format of the file is:
       
       _Attributes_ are the most important part of the error map as they convey _how_
       an error code should be handled. An error code may have more than a single
      -attribute.
      +attribute. As of version 2 clients *must* ignore unknown attributes and only
      +deal with the attributes they understand.
       
       * `item-deleted`: This attribute means that the error is related to operating
         on a soft-deleted document.
      @@ -107,6 +110,8 @@ attribute.
       
       * `dcp`: The error is related to the DCP subsystem.
       
      +* `rate-limit`: The error is related to rate limitation for the client (version 2)
      +
       * `success`: The operation was successful for those situations where the error
         code is indicating successful (i.e. subdocument operations carried out on a
         deleted document)
      

      libcouchbase need to:

      • add support for new error codes
      • add support for new error map attributes
      • if the server switched to error map v2, libcouchbase should ignore new attributes instead of returning protocol error

      Attachments

        Issue Links

          For Gerrit Dashboard: CCBC-1432
          # Subject Branch Project Status CR V

          Activity

            People

              avsej Sergey Avseyev
              avsej Sergey Avseyev
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty