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

Touch Invalid Parameters Error: Detected on customer upgrades

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.4.0
    • Component/s: library
    • Labels:
      None
    • Environment:
      Couchbase 5.x

      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

            Hide
            build-team Couchbase Build Team added a comment -

            Build couchbase-server-6.5.0-1487 contains gocb commit 129fbfb with commit message:
            GOCBC-317 Don't pass CAS value to TouchEx

            Show
            build-team Couchbase Build Team added a comment - Build couchbase-server-6.5.0-1487 contains gocb commit 129fbfb with commit message: GOCBC-317 Don't pass CAS value to TouchEx
            Hide
            build-team Couchbase Build Team added a comment -

            Build sync_gateway-2.6.0-2 contains gocb commit 129fbfb with commit message:
            GOCBC-317 Don't pass CAS value to TouchEx

            Show
            build-team Couchbase Build Team added a comment - Build sync_gateway-2.6.0-2 contains gocb commit 129fbfb with commit message: GOCBC-317 Don't pass CAS value to TouchEx
            Hide
            build-team Couchbase Build Team added a comment -

            Build sync_gateway-2.6.0-2 contains gocbcore commit 553f86b with commit message:
            GOCBC-317 Always pass CAS value of 0 from TouchEx

            Show
            build-team Couchbase Build Team added a comment - Build sync_gateway-2.6.0-2 contains gocbcore commit 553f86b with commit message: GOCBC-317 Always pass CAS value of 0 from TouchEx
            Hide
            build-team Couchbase Build Team added a comment -

            Build sync_gateway-2.5.1-8 contains gocb commit 129fbfb with commit message:
            GOCBC-317 Don't pass CAS value to TouchEx

            Show
            build-team Couchbase Build Team added a comment - Build sync_gateway-2.5.1-8 contains gocb commit 129fbfb with commit message: GOCBC-317 Don't pass CAS value to TouchEx
            Hide
            build-team Couchbase Build Team added a comment -

            Build sync_gateway-2.5.1-8 contains gocbcore commit 553f86b with commit message:
            GOCBC-317 Always pass CAS value of 0 from TouchEx

            Show
            build-team Couchbase Build Team added a comment - Build sync_gateway-2.5.1-8 contains gocbcore commit 553f86b with commit message: GOCBC-317 Always pass CAS value of 0 from TouchEx

              People

              • Assignee:
                charles.dixon Charles Dixon
                Reporter:
                Raymundo.Flores Raymundo Flores
              • 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

                    Error rendering 'com.pagerduty.jira-server-plugin:PagerDuty'. Please contact your Jira administrators.