Uploaded image for project: 'Couchbase C client library libcouchbase'
  1. Couchbase C client library libcouchbase
  2. CCBC-114

Starting with Beta2, only 1/2 my commands return and the others hang or timeout

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.0beta2
    • Fix Version/s: 2.0.0beta3
    • Component/s: library
    • Security Level: Public
    • Labels:
      None
    • Environment:
      CentOS 6.2, 64-Bit, libev

      Description

      Ok, I was on a previous beta taken from Sergey's git with libev embeded support. Mostly, things were working fine except having some issues with socket disconnect, etc.

      I just examined beta2 from the 12th and I see that not only is all the libev code in it, there are additional changes...so, I grabbed it and am trying to get my test apps to work.

      I am building the library

      ./configure --enable-static --enable-debug --disable-plugins --disable-couchbasemock --disable-tools

      and then linking the libev plugin object into my application outside of libcouchbase.

      Ok, so first thing I noticed was that:

      memset( &ciops, 0, sizeof( ciops ) );
      ciops.v.v0.type = LCB_IO_OPS_LIBEV;
      ciops.v.v0.cookie = loop;

      used to work just fine. Now, it results in a "generic error" being returned from lcb_create_io_ops().

      I switched it to

      ciops.version = 1;
      ciops.v.v1.sofile = NULL;
      ciops.v.v1.symbol = "lcb_create_libev_io_opts";
      ciops.v.v1.cookie = loop;

      and now lcb_create_io_ops() works as expected. I don't think this is right? It looks like it's not handled properly
      in the call where create_v0 -> create_v1 converts the stucture relating to the sofile struct member; however, I could be wrong,
      or maybe this is functioning as designed? Don't know.

      However, once I got past that - here is the real problem:

      Only about 1/2 of my commands (whether it be from store or get) are comming back with LCB_SUCCESS.
      If I connect and batch off say 100 calls to get, about 50 will come back LCB_SUCCESS and the other 50
      will come back with a timeout error. The errors are NOT inter-mixed with the successful calls...meaning, whichever
      50 come back good happen 1st and then the remaining events are all timeout (no mixing/alternating with the successful returns).

      This was not the case with the git code I was using previously.

      Now, if I do not use lcb_set_timeout(), I don't get the timeout error...it just hangs after the 50 LCB_SUCCESS
      returns and no events appear to be firing

      Help!!! :<

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

        Activity

        Hide
        mleib Michael Leib added a comment -

        Ok, the api question still remains but something went funky with the server...both nodes went offline and I could not restart them...ended up having to re-install 2.0 beta cb server from scratch and now I no longer have the timeout issue. Somehow, the "db" got corrupted. If the api change is per specification, this is ok to resolve.

        Show
        mleib Michael Leib added a comment - Ok, the api question still remains but something went funky with the server...both nodes went offline and I could not restart them...ended up having to re-install 2.0 beta cb server from scratch and now I no longer have the timeout issue. Somehow, the "db" got corrupted. If the api change is per specification, this is ok to resolve.
        Hide
        avsej Sergey Avseyev added a comment -

        You are right I've lost one dlopen() call with NULL

        Fixed in http://review.couchbase.org/22265

        Show
        avsej Sergey Avseyev added a comment - You are right I've lost one dlopen() call with NULL Fixed in http://review.couchbase.org/22265

          People

          • Assignee:
            avsej Sergey Avseyev
            Reporter:
            mleib Michael Leib
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Gerrit Reviews

              There are no open Gerrit changes