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

data structures tests all fail

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 3.0.0-beta.2
    • None
    • None
    • 1

    Description

      When I run nosetests -v couchbase_v2/tests/cases/datastructures_t.py
      I see:

      ======================================================================
      ERROR: test_list (couchbase_v2.tests.cases.datastructures_t.DatastructureTest)
      ----------------------------------------------------------------------
      Traceback (most recent call last):
        File "/Users/davidkelly/projects/gerrit/couchbase-python-client/couchbase_v2/tests/cases/datastructures_t.py", line 48, in test_list
          self.cb.remove(key, quiet=True)
        File "<boltons.funcutils.FunctionBuilder-15>", line 2, in remove
        File "/Users/davidkelly/projects/gerrit/couchbase-python-client/couchbase/result.py", line 375, in mutated
          result = func(*args, **kwargs)
        File "/Users/davidkelly/projects/gerrit/couchbase-python-client/couchbase/collection.py", line 929, in remove
          return ResultPrecursor(self.bucket.remove(id, **final_options), final_options)
      couchbase_core.exceptions.NotSupportedError: <RC=0x13[LCB_NOT_SUPPORTED (0x13)], There was a problem scheduling your request, or determining the appropriate server or vBucket for the key(s) requested. This may also be a bug in the SDK if there are no network issues, C Source=(src/miscops.c,132)>
      -------------------- >> begin captured logging << --------------------
      root: INFO: info is {'host': 'localhost', 'port': 8091, 'admin_username': 'Administrator', 'admin_password': 'password', 'bucket_name': 'default', 'bucket_password': 'password', 'ipv6': 'disabled', 'protocol': 'http', 'enable_tracing': None, 'tracingparms': {'port': None}, 'bucket_username': None, 'certpath': None, 'keypath': None, 'analytics_host': 'localhost', 'analytics_port': 8091, 'network': None}
      --------------------- >> end captured logging << ---------------------
       
      ======================================================================
      ERROR: test_map (couchbase_v2.tests.cases.datastructures_t.DatastructureTest)
      ----------------------------------------------------------------------
      Traceback (most recent call last):
        File "/Users/davidkelly/projects/gerrit/couchbase-python-client/couchbase_v2/tests/cases/datastructures_t.py", line 28, in test_map
          self.cb.remove(key, quiet=True)
        File "<boltons.funcutils.FunctionBuilder-15>", line 2, in remove
        File "/Users/davidkelly/projects/gerrit/couchbase-python-client/couchbase/result.py", line 375, in mutated
          result = func(*args, **kwargs)
        File "/Users/davidkelly/projects/gerrit/couchbase-python-client/couchbase/collection.py", line 929, in remove
          return ResultPrecursor(self.bucket.remove(id, **final_options), final_options)
      couchbase_core.exceptions.NotSupportedError: <RC=0x13[LCB_NOT_SUPPORTED (0x13)], There was a problem scheduling your request, or determining the appropriate server or vBucket for the key(s) requested. This may also be a bug in the SDK if there are no network issues, C Source=(src/miscops.c,132)>
       
      ======================================================================
      ERROR: test_queue (couchbase_v2.tests.cases.datastructures_t.DatastructureTest)
      ----------------------------------------------------------------------
      Traceback (most recent call last):
        File "/Users/davidkelly/projects/gerrit/couchbase-python-client/couchbase_v2/tests/cases/datastructures_t.py", line 100, in test_queue
          self.cb.remove(key, quiet=True)
        File "<boltons.funcutils.FunctionBuilder-15>", line 2, in remove
        File "/Users/davidkelly/projects/gerrit/couchbase-python-client/couchbase/result.py", line 375, in mutated
          result = func(*args, **kwargs)
        File "/Users/davidkelly/projects/gerrit/couchbase-python-client/couchbase/collection.py", line 929, in remove
          return ResultPrecursor(self.bucket.remove(id, **final_options), final_options)
      couchbase_core.exceptions.NotSupportedError: <RC=0x13[LCB_NOT_SUPPORTED (0x13)], There was a problem scheduling your request, or determining the appropriate server or vBucket for the key(s) requested. This may also be a bug in the SDK if there are no network issues, C Source=(src/miscops.c,132)>
       
      ======================================================================
      ERROR: test_sets (couchbase_v2.tests.cases.datastructures_t.DatastructureTest)
      ----------------------------------------------------------------------
      Traceback (most recent call last):
        File "/Users/davidkelly/projects/gerrit/couchbase-python-client/couchbase_v2/tests/cases/datastructures_t.py", line 80, in test_sets
          self.cb.remove(key, quiet=True)
        File "<boltons.funcutils.FunctionBuilder-15>", line 2, in remove
        File "/Users/davidkelly/projects/gerrit/couchbase-python-client/couchbase/result.py", line 375, in mutated
          result = func(*args, **kwargs)
        File "/Users/davidkelly/projects/gerrit/couchbase-python-client/couchbase/collection.py", line 929, in remove
          return ResultPrecursor(self.bucket.remove(id, **final_options), final_options)
      couchbase_core.exceptions.NotSupportedError: <RC=0x13[LCB_NOT_SUPPORTED (0x13)], There was a problem scheduling your request, or determining the appropriate server or vBucket for the key(s) requested. This may also be a bug in the SDK if there are no network issues, C Source=(src/miscops.c,132)>
       
      ----------------------------------------------------------------------
      Ran 4 tests in 1.876s
       
      FAILED (errors=4)

      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 - - edited

          Not seen this one before - those tests work fine with my mock and 6.5 on my install. I assume this only happens with a real server. If so, which one? 

          Ellis.Breen Ellis Breen added a comment - - edited Not seen this one before - those tests work fine with my mock and 6.5 on my install. I assume this only happens with a real server. If so, which one? 
          david.kelly David Kelly added a comment -

          6.0 indeed, they all pass on 6.5

          david.kelly David Kelly added a comment - 6.0 indeed, they all pass on 6.5
          Ellis.Breen Ellis Breen added a comment -

          This is pretty interesting - I wonder what operations they are attempting that weren't supported on 6.0. I think there may have been some new subdoc operations supported in 6.5 like EXISTS but I wasn't aware we were using them for Datastructures, yet. However, LCB may be using them underneath.

          Ellis.Breen Ellis Breen added a comment - This is pretty interesting - I wonder what operations they are attempting that weren't supported on 6.0. I think there may have been some new subdoc operations supported in 6.5 like EXISTS but I wasn't aware we were using them for Datastructures, yet. However, LCB may be using them underneath.
          david.kelly David Kelly added a comment -

          So – first bit of a plan is to make CollectionTestCase be aware if there are collections & scopes, and not try to create them, returning the default collection (or scope) instead.  This maybe is enough, and could fix some other issues too perhaps.

          david.kelly David Kelly added a comment - So – first bit of a plan is to make CollectionTestCase be aware if there are collections & scopes, and not try to create them, returning the default collection (or scope) instead.  This maybe is enough, and could fix some other issues too perhaps.
          Ellis.Breen Ellis Breen added a comment - - edited

          Further to the above, it turns out this V2 test is a CollectionsTestCase now (so should be moved to the V3 test suite), and the reason it fails with 6.0.0 is because it is sending collections command.

          We therefore need to detect/anticipate the support for collections either by server version lookup, by probing the server, or accessing the Bucket capabilities. These appear not to be directly exposed by LCB, but the bucket settings are altered if collections support is negotiated but not found:

           

           

          if ((LCBVB_CAPS(LCBT_VBCONFIG(instance)) & LCBVB_CAP_COLLECTIONS) == 0)
          { LCBT_SETTING(parent, use_collections) = 0; }
           
          

           (from bootstrap.cc)

          It appears this may be accessible via cntl commands: (from cntl.cc)

          {"enable_collections", LCB_CNTL_ENABLE_COLLECTIONS, convert_intbool}

          ,

           

          Therefore this may be possible to check robustly and programmatically without recourse to lookup/manual switches.

           

           

           

          Ellis.Breen Ellis Breen added a comment - - edited Further to the above, it turns out this V2 test is a CollectionsTestCase now (so should be moved to the V3 test suite), and the reason it fails with 6.0.0 is because it is sending collections command. We therefore need to detect/anticipate the support for collections either by server version lookup, by probing the server, or accessing the Bucket capabilities. These appear not to be directly exposed by LCB, but the bucket settings are altered if collections support is negotiated but not found:     if ((LCBVB_CAPS(LCBT_VBCONFIG(instance)) & LCBVB_CAP_COLLECTIONS) == 0 ) { LCBT_SETTING(parent, use_collections) = 0 ; }    (from bootstrap.cc) It appears this may be accessible via cntl commands: (from cntl.cc) { "enable_collections" , LCB_CNTL_ENABLE_COLLECTIONS, convert_intbool} ,   Therefore this may be possible to check robustly and programmatically without recourse to lookup/manual switches.      
          david.kelly David Kelly added a comment -

          couchbase test base class fixes did the trick for this.

          david.kelly David Kelly added a comment - couchbase test base class fixes did the trick for this.

          People

            Ellis.Breen Ellis Breen
            david.kelly David Kelly
            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