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

GetPendingMutations looking for incorrect structure in response body

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.1.7
    • None
    • None
    • 1

    Description

      Whilst we have tests for this, they test against a dataset which is over no data. When performed over dataset(s) with data we see `json: cannot unmarshal object into Go value of type uint64`

       

      The correct format to parse is

      {
      "Default" :

      { "default" : 0 }

      }

      where Default is the dataverse and default is the dataset name

      Attachments

        Issue Links

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

          Activity

            charles.dixon Charles Dixon created issue -
            charles.dixon Charles Dixon made changes -
            Field Original Value New Value
            Status New [ 10003 ] Open [ 1 ]

            Charles - I've encountered something like this in the java sdk. It fails on parsing the 'long' as the parser is stuck on START_OBJECT when it should be on INTEGER.  I don't know why.  When the call to decodeInto is changed to use a Class (instead of a TypeReference), it succeeds, but the resulting entry is a <String,Integer> instead of a <String,Long> - but the runtime does not seem to notice or care.

            Caused by: com.couchbase.client.core.deps.com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize instance of `java.lang.Long` out of START_OBJECT token
            at [Source: (byte[])"{
            "Default" :

            { "myDataset" : 0 }

            }"; line: 2, column: 15]

            michael.reiche Michael Reiche added a comment - Charles - I've encountered something like this in the java sdk. It fails on parsing the 'long' as the parser is stuck on START_OBJECT when it should be on INTEGER.  I don't know why.  When the call to decodeInto is changed to use a Class (instead of a TypeReference), it succeeds, but the resulting entry is a <String,Integer> instead of a <String,Long> - but the runtime does not seem to notice or care. Caused by: com.couchbase.client.core.deps.com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize instance of `java.lang.Long` out of START_OBJECT token at [Source: (byte[])"{ "Default" : { "myDataset" : 0 } }"; line: 2, column: 15]
            charles.dixon Charles Dixon made changes -
            Fix Version/s 2.1.7 [ 17056 ]
            Fix Version/s 2.1.6 [ 17030 ]
            charles.dixon Charles Dixon made changes -
            Description Whilst we have tests for this, they test against a dataset which is over no data. When performed over dataset(s) with data we see `json: cannot unmarshal object into Go value of type uint64` Whilst we have tests for this, they test against a dataset which is over no data. When performed over dataset(s) with data we see `json: cannot unmarshal object into Go value of type uint64`

             

            The correct format to parse is

            {
             "Default" : {
             "default" : 0
             }
            }

            where Default is the dataverse and default is the dataset name
            charles.dixon Charles Dixon made changes -
            Link This issue is cloned by GOCBC-986 [ GOCBC-986 ]
            charles.dixon Charles Dixon made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            charles.dixon Charles Dixon made changes -
            Resolution Fixed [ 1 ]
            Status In Progress [ 3 ] Resolved [ 5 ]

            Build sync_gateway-3.0.0-52 contains gocb commit c9c6097 with commit message:
            GOCBC-977: Alter signature of GetPendingMutations

            build-team Couchbase Build Team added a comment - Build sync_gateway-3.0.0-52 contains gocb commit c9c6097 with commit message: GOCBC-977 : Alter signature of GetPendingMutations

            Build couchbase-server-7.0.0-4715 contains gocb commit c9c6097 with commit message:
            GOCBC-977: Alter signature of GetPendingMutations

            build-team Couchbase Build Team added a comment - Build couchbase-server-7.0.0-4715 contains gocb commit c9c6097 with commit message: GOCBC-977 : Alter signature of GetPendingMutations

            Build couchbase-server-7.1.0-1767 contains gocb commit c9c6097 with commit message:
            GOCBC-977: Alter signature of GetPendingMutations

            build-team Couchbase Build Team added a comment - Build couchbase-server-7.1.0-1767 contains gocb commit c9c6097 with commit message: GOCBC-977 : Alter signature of GetPendingMutations

            People

              charles.dixon Charles Dixon
              charles.dixon Charles Dixon
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty