Uploaded image for project: 'Couchbase Python Client Library'
  1. Couchbase Python Client Library
  2. PYCBC-675

result object not what was expected

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • 3.0.0-beta.1
    • 3.0.0-beta.3
    • None
    • None
    • 1
    • SDK1: GA and Priority List

    Description

      As a user, I am expecting .upsert() to return a MutationResult. That's what's in the SDK3 RFC and it's even what the documentation says in the the doc block in the SDK.

      There are two bugs hereā€¦

      The Documentation says I'll receive:

      OperationResult<RC=0x0, Key=u'u:king_arthur', CAS=0xb1da029b0000>
      

      I actually receive:

      <couchbase.result.SDK2MutationResult object at 0x1051bc8d0>
      

      The docs should be up to date with what's returned and I shouldn't be seeing SDK2 at this time in results.

      Attachments

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

        Activity

          david.kelly David Kelly added a comment -

          At first glance, there are numerous things to do in the collection interface to make it RFC-compliant - lets do them all as part of this ticket.

          david.kelly David Kelly added a comment - At first glance, there are numerous things to do in the collection interface to make it RFC-compliant - lets do them all as part of this ticket.
          david.kelly David Kelly added a comment - - edited

          So far, other than the SDK2MutationResult mentioned in this ticket, there is also a SDK2GetResult and so on... Just looking at the collection.get calls, we also need to make the GetOptions correct, the GetResult as well, and match the desired exceptions. For instance, DocumentNotFoundException doesn't even exist. So – this is a long ways from RFC-complete.

          Also - if you want projections or expiry, the get will not work properly. You should do a sub-doc lookup for projections and with_expiry. However the with_expiry was not implemented (just copied the value you set in – maybe confused with timeout?) and the projections did try to do a lookup_in but the code is broken.

          So... Maybe we need to discuss the scope of this ticket and add more tickets? I'll have an idea in the morning. I'll have a small PR with how I think the options and so on should look, but this ticket should really not include all that work, which overlaps several other tickets.

          david.kelly David Kelly added a comment - - edited So far, other than the SDK2MutationResult mentioned in this ticket, there is also a SDK2GetResult and so on... Just looking at the collection.get calls, we also need to make the GetOptions correct , the GetResult as well, and match the desired exceptions. For instance, DocumentNotFoundException doesn't even exist. So – this is a long ways from RFC-complete. Also - if you want projections or expiry, the get will not work properly. You should do a sub-doc lookup for projections and with_expiry. However the with_expiry was not implemented (just copied the value you set in – maybe confused with timeout?) and the projections did try to do a lookup_in but the code is broken. So... Maybe we need to discuss the scope of this ticket and add more tickets? I'll have an idea in the morning. I'll have a small PR with how I think the options and so on should look, but this ticket should really not include all that work, which overlaps several other tickets.
          david.kelly David Kelly added a comment -

          Lots more to do with collection interface, but this issue is done. More to come

          david.kelly David Kelly added a comment - Lots more to do with collection interface, but this issue is done. More to come

          People

            david.kelly David Kelly
            ingenthr Matt Ingenthron
            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