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