Uploaded image for project: 'Couchbase Go SDK'
  1. Couchbase Go SDK
  2. GOCBC-317

Touch Invalid Parameters Error: Detected on customer upgrades

    XMLWordPrintable

Details

    • Task
    • Resolution: Fixed
    • Major
    • 1.4.0
    • None
    • library
    • None
    • Couchbase 5.x
    • 1

    Description

      Request
       
      Modify the API or documentation for Touch function to don't ask for document's CAS parameter, touch doesn't amend document value.

      https://godoc.org/github.com/couchbase/gocb#Bucket.Touch

       
      Background
       
       The following snippet was accepted when working with to 4.6 version:

      ``` 
      fragment, mErr := bucket.MutateIn("1", 0, 0).Upsert("name", "New Test", false).Execute()
          if mErr != nil {
              logrus.Error("Mutate " + mErr.Error())
          }

          _, tErr := bucket.Touch("1", gocb.Cas(fragment.Cas()), uint32(20))
      ```
       Problem
       
      When you execute the same code on 5.x server an invalid error parameter is raised, the workaround is to fix the CAS value to 0:

      ```
          _, tErr := bucket.Touch("1", gocb.Cas(0), uint32(20))
      ```
       

      Attachments

        Issue Links

          For Gerrit Dashboard: GOCBC-317
          # Subject Branch Project Status CR V

          Activity

            People

              charles.dixon Charles Dixon
              Raymundo.Flores Raymundo Flores (Inactive)
              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