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

incr() and decr() not working with VBucketAwareMembaseClient / Membase 1.7

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.5
    • Fix Version/s: 0.7
    • Component/s: library
    • Security Level: Public
    • Labels:
      None
    • Environment:
      Client platform: Linux / Windows
      Server platform: Membase Server 1.7.1 with 1 active server with a Membase VBucket - any authentication

      Description

      See reproduction code attached. When executed it spits out a lot of errors ('amount') and eventually times out while still erroring in the background.

      1. incr.py
        0.3 kB
        Oli Kingshott
      No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

        Hide
        ingenthr Matt Ingenthron added a comment -

        Oli described what he'd found on investigation to me, and I've now posted a change for review:
        http://review.couchbase.org/#change,9404

        Show
        ingenthr Matt Ingenthron added a comment - Oli described what he'd found on investigation to me, and I've now posted a change for review: http://review.couchbase.org/#change,9404
        Hide
        ingenthr Matt Ingenthron added a comment - - edited

        Fix went through, but seems to have been incorrect (testing 0.5-19-g0680cfe):

        >>> client_one.incr('jacob')
        Exception in thread dispatcher-thread:
        Traceback (most recent call last):
        File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/threading.py", line 522, in __bootstrap_inner
        self.run()
        File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/threading.py", line 477, in run
        self._target(*self.args, **self._kwargs)
        File "couchbaseclient.py", line 651, in _start_dispatcher
        self.dispatcher.dispatch()
        File "couchbaseclient.py", line 954, in dispatch
        self.do(item)
        File "couchbaseclient.py", line 1089, in do
        amount = item["amt"]
        KeyError: 'amt'

        Traceback (most recent call last):
        File "<stdin>", line 1, in <module>
        File "couchbaseclient.py", line 908, in incr
        return self._respond(item, event)
        File "couchbaseclient.py", line 820, in _respond
        raise MemcachedTimeoutException(item, timeout)
        exception.MemcachedTimeoutException: timeout - memcached did not return in 30 second during incr operation for key jacob

        Show
        ingenthr Matt Ingenthron added a comment - - edited Fix went through, but seems to have been incorrect (testing 0.5-19-g0680cfe): >>> client_one.incr('jacob') Exception in thread dispatcher-thread: Traceback (most recent call last): File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/threading.py", line 522, in __bootstrap_inner self.run() File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/threading.py", line 477, in run self._ target(*self. args, **self. _kwargs) File "couchbaseclient.py", line 651, in _start_dispatcher self.dispatcher.dispatch() File "couchbaseclient.py", line 954, in dispatch self.do(item) File "couchbaseclient.py", line 1089, in do amount = item ["amt"] KeyError: 'amt' Traceback (most recent call last): File "<stdin>", line 1, in <module> File "couchbaseclient.py", line 908, in incr return self._respond(item, event) File "couchbaseclient.py", line 820, in _respond raise MemcachedTimeoutException(item, timeout) exception.MemcachedTimeoutException: timeout - memcached did not return in 30 second during incr operation for key jacob
        Hide
        oliland Oli Kingshott added a comment -

        This must be for a later build as I can confirm the patch works for release 0.5.

        Show
        oliland Oli Kingshott added a comment - This must be for a later build as I can confirm the patch works for release 0.5.
        Hide
        BigBlueHat Benjamin Young added a comment - - edited

        The patch Matt mentioned does seem to have fixed the issue. Current incr() tests pass just fine.

        Show
        BigBlueHat Benjamin Young added a comment - - edited The patch Matt mentioned does seem to have fixed the issue. Current incr() tests pass just fine.

          People

          • Assignee:
            farshid Farshid Ghods (Inactive)
            Reporter:
            oliland Oli Kingshott
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Gerrit Reviews

              There are no open Gerrit changes