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

Forward compat with python issue

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 3.1.0
    • library
    • None
    • 1

    Description

      David Kelly to describe how to build, and do a build with current HEAD posting what is failing in this ticket.

      Attachments

        For Gerrit Dashboard: PYCBC-1113
        # Subject Branch Project Status CR V

        Activity

          david.kelly David Kelly added a comment - - edited

          To make a build against a specific SHA or tag, edit the cbuild_cfg.json file, putting that tag/sha for the LCB_TAG value.  Then, python3 setup.py build_ext --inplace will build it.  

          I do see a lot of errors. For instance, we have a test that just tests collection.get. Here's the output, with LCB_LOGLEVEL=5:
          get_error.log

          However, a simple script that just upsets and gets, works fine. Note this is against an actual server, as is the log snippet above. Unsure what to make of this quite yet.

          david.kelly David Kelly added a comment - - edited To make a build against a specific SHA or tag, edit the cbuild_cfg.json file, putting that tag/sha for the LCB_TAG value.  Then, python3 setup.py build_ext --inplace will build it.   I do see a lot of errors. For instance, we have a test that just tests collection.get . Here's the output, with LCB_LOGLEVEL=5 : get_error.log However, a simple script that just upsets and gets, works fine. Note this is against an actual server, as is the log snippet above. Unsure what to make of this quite yet.
          david.kelly David Kelly added a comment -

          Actually, it isn't consistent. Sometimes the simple script fails too. Will get some details...

          david.kelly David Kelly added a comment - Actually, it isn't consistent. Sometimes the simple script fails too. Will get some details...
          david.kelly David Kelly added a comment -

          OK - this happens with 3.0.7. Nothing to do with 3.1.0. I'm guessing the issue is on the python side. Lets not close this, but Sergey Avseyev this is probably not anything for you to worry about.

          david.kelly David Kelly added a comment - OK - this happens with 3.0.7. Nothing to do with 3.1.0. I'm guessing the issue is on the python side. Lets not close this, but Sergey Avseyev this is probably not anything for you to worry about.
          david.kelly David Kelly added a comment -

          The bindings mistakenly call lcb_cmdget_locktime with 0 for the time, during an ordinary get. This now seems to lock the document briefly, causing subsequent mutation to fail, where as before, this didn't lock the document at all. This seems to be the issue. For the python side, the fix is clear. For LCB, I'm not sure if this is an issue at all. Perhaps what is happening is the document is locked till the start of the next second? It seems like perhaps that is it, not really sure. Probably though, LCB should not lock the document at all if 0 is passed in. Worth checking. I do see a test for this though.

          david.kelly David Kelly added a comment - The bindings mistakenly call lcb_cmdget_locktime with 0 for the time, during an ordinary get. This now seems to lock the document briefly, causing subsequent mutation to fail, where as before, this didn't lock the document at all. This seems to be the issue. For the python side, the fix is clear. For LCB, I'm not sure if this is an issue at all. Perhaps what is happening is the document is locked till the start of the next second? It seems like perhaps that is it, not really sure. Probably though, LCB should not lock the document at all if 0 is passed in. Worth checking. I do see a test for this though.
          jared.casey Jared Casey added a comment -

          More info to the ticket for posterity...

           

          Needed to update the python CMakeLists.txt as centos and amazon Linux builds were failing.  It was odd that the master branch would build successfully but the new branch (with the updated LCB) was failing.  Hence why there was some suspicion.

           

          Also, had a problem w/ prepared queries when using LCB v 3.1.0, but that has been corrected with 3.1.1.

          couchbase.exceptions.HTTPException: <RC=0x41D[LCB_ERR_HTTP (1053)], HTTP Request failed. Examine 'objextra' for full result, Results=1, C Source=(src/pycbc_http.c,212), OBJ=ViewResult<rc=0x41D[LCB_ERR_HTTP (1053)], value={'requestID': '56037321-8cff-4ac5-a56c-6d63f340ee91', 'errors': [{'code': 1065, 'msg': 'Unrecognized parameter in request: query_context'}], 'status': 'fatal', 'metrics': {'elapsedTime': '137.194µs', 'executionTime': '87.785µs', 'resultCount': 0, 'resultSize': 0, 'errorCount': 1}}, http_status=0, tracing_context=0, tracing_output=None>, Context={'first_error_code': 1065, 'http_response_code': 400, 'first_error_message': 'Unrecognized parameter in request: query_context', 'statement': 'SELECT * FROM `beer-sample` LIMIT 2', 'client_context_id': 'e5f8dfe157913329', 'query_params': '', 'http_response_body': '', 'endpoint': 'localhost:8093', 'type': 'QueryErrorContext'}, Tracing Output={":nokey:0": null}>

           

          Working on integration tests, but tests (both mock and integration) seem just fine on my local machine.

          jared.casey Jared Casey added a comment - More info to the ticket for posterity...   Needed to update the python CMakeLists.txt as centos and amazon Linux builds were failing.  It was odd that the master branch would build successfully but the new branch (with the updated LCB) was failing.  Hence why there was some suspicion.   Also, had a problem w/ prepared queries when using LCB v 3.1.0, but that has been corrected with 3.1.1. couchbase.exceptions.HTTPException: <RC= 0x41D [LCB_ERR_HTTP ( 1053 )], HTTP Request failed. Examine 'objextra' for full result, Results= 1 , C Source=(src/pycbc_http.c, 212 ), OBJ=ViewResult<rc= 0x41D [LCB_ERR_HTTP ( 1053 )], value={ 'requestID' : '56037321-8cff-4ac5-a56c-6d63f340ee91' , 'errors' : [{ 'code' : 1065 , 'msg' : 'Unrecognized parameter in request: query_context' }], 'status' : 'fatal' , 'metrics' : { 'elapsedTime' : '137.194µs' , 'executionTime' : '87.785µs' , 'resultCount' : 0 , 'resultSize' : 0 , 'errorCount' : 1 }}, http_status= 0 , tracing_context= 0 , tracing_output=None>, Context={ 'first_error_code' : 1065 , 'http_response_code' : 400 , 'first_error_message' : 'Unrecognized parameter in request: query_context' , 'statement' : 'SELECT * FROM `beer-sample` LIMIT 2' , 'client_context_id' : 'e5f8dfe157913329' , 'query_params' : '' , 'http_response_body' : '' , 'endpoint' : 'localhost:8093' , 'type' : 'QueryErrorContext' }, Tracing Output={ ":nokey:0" : null }>   Working on integration tests, but tests (both mock and integration) seem just fine on my local machine.

          People

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