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

Mutation is still happening even when the query option is set with Readonly=true

    XMLWordPrintable

Details

    • Bug
    • Resolution: Not a Bug
    • Major
    • None
    • 2.6.3
    • library
    • None
    • 0

    Description

      It has been observed that the gocb SDK is having an issue where the mutation is happening when a query is executed with the query option Readonly=true without throwing an error.

      // Set the readonly flag to true
      options := &gocb.QueryOptions

      { Readonly: true, }

      // Execute the scoped query
      mutation := fmt.Sprintf("UPDATE `_default` SET name='40-Mile Air New %v' WHERE META().id='airline_10'", time.Now().Unix())

      Steps:
      1) Install couchbase (say Enterprise Edition 7.5.0 build 4144) and install travel-sample
      2) Download the attached.
      3) go run main.go
      See the mutation is getting successful even Readonly=true but expecting an error.

      Attachments

        1. go.mod
          0.2 kB
        2. go.sum
          2 kB
        3. main.go
          2 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            jagadesh.munta@couchbase.com Jagadesh Munta
            jagadesh.munta@couchbase.com Jagadesh Munta
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty