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

Collection doesn't implement replica reads per the RFC

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.0.0-alpha.5
    • 3.0.0-beta.3
    • library
    • None
    • 1
    • SDK1: GA and Priority List

    Description

      Attachments

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

        Activity

          Ellis.Breen Ellis Breen added a comment -

          There is a Collection.get_from_replica method which probably needs to be refactored to the requisite get_any_replica and get_all_replicas methods. Having a look now.

          Ellis.Breen Ellis Breen added a comment - There is a Collection.get_from_replica method which probably needs to be refactored to the requisite get_any_replica and get_all_replicas methods. Having a look now.
          david.kelly David Kelly added a comment -

          Seems LCB supports it – so I'll expose it in python, and so on...

          david.kelly David Kelly added a comment - Seems LCB supports it – so I'll expose it in python, and so on...
          david.kelly David Kelly added a comment -

          Well - get_any_replica is already supported under the hood, so that was easy. The get_all_replica is odd in that a single id maps to a list of results, which the C bindings seem not to handle simply in their existing macros. Looking harder at that but this was not as easy as I'd hoped...

          david.kelly David Kelly added a comment - Well - get_any_replica is already supported under the hood, so that was easy. The get_all_replica is odd in that a single id maps to a list of results, which the C bindings seem not to handle simply in their existing macros. Looking harder at that but this was not as easy as I'd hoped...
          david.kelly David Kelly added a comment -

          So a first pass corrects the interface, implements get_any_replica(). What I've seen so far: get_all_replicas only returns a single result, given how it was initially done. Since 1 id maps to multiple results, the macros don't know how to deal with it. So that right now raises NotImplementedError. Also - the is_replica flag on the results isn't implemented. But the interface is there at least.

          Also - this appears to only work against the default collection. So – working on that now.

          david.kelly David Kelly added a comment - So a first pass corrects the interface, implements get_any_replica(). What I've seen so far: get_all_replicas only returns a single result, given how it was initially done. Since 1 id maps to multiple results, the macros don't know how to deal with it. So that right now raises NotImplementedError. Also - the is_replica flag on the results isn't implemented. But the interface is there at least. Also - this appears to only work against the default collection. So – working on that now.

          People

            david.kelly David Kelly
            jmorris Jeff Morris
            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