Percona-Lab / sysbench-mongodb-lua

Apache License 2.0
14 stars 14 forks source link

"FATAL: `thread_run' function failed" error received upon running oltp-mongo.lua test #1

Open ksatchit opened 6 years ago

ksatchit commented 6 years ago

Hello @alexey2k

Firstly, thank you for coming up with the sysbench-based benchmark for MongoDB. I am trying to run this test on a MongoDB replicaset (that is running as a kubernetes statefulset). Followed the instructions in the README.md, and was able to execute the "prepare" step successfully (confirmed by perform "show dbs" on the MongoDB primary instance). However, the "run" step fails with error :

FATAL: `thread_run' function failed: oltp-mongo.lua:222: BatchSize value must be non-negative, but received: -1

Could you please help me on this ?

Here are the environment details :

Command outputs :

kart@Master:~/sysbench-mongodb-lua$ sysbench  oltp-mongo.lua --tables=10 --threads=10 --table-size=100 --mongodb-db=sbtest --mongodb-host=10.44.0.3 --mongodb-port=27017 prepare
sysbench 1.0.9 (using bundled LuaJIT 2.1.0-beta2)

Initializing worker threads...

Creating table 'sbtest10'...
Inserting 100 records into 'sbtest10'
:
Creating table 'sbtest7'...
Inserting 100 records into 'sbtest7'
:
Creating a secondary index on 'sbtest7'...

However, the run test fails with the following error :

kart@Master:~/sysbench-mongodb-lua$ sysbench  oltp-mongo.lua --tables=10 --threads=10 --table-size=100 --mongodb-db=sbtest --mongodb-host=10.44.0.3 --mongodb-port=27017 --time=120 run
sysbench 1.0.9 (using bundled LuaJIT 2.1.0-beta2)

Running the test with following options:
Number of threads: 10
Initializing random number generator from current time

Initializing worker threads...

Threads started!

FATAL: `thread_run' function failed: oltp-mongo.lua:222: BatchSize value must be non-negative, but received: -1
alexey2k commented 6 years ago

Karthik,

Ok, I understand problem and have solution:

problem: luarocks mongorover rock package is outdated. I don't know how it possible and why it happened that's out of my scope.

Despite the fact that MongoDB docs mentioned that BatchSize can be negative

... mongoc_collection_find (mongoc_collection_t *collection, mongoc_query_flags_t flags, uint32_t skip, uint32_t limit, uint32_t batch_size, ... batch_size: A uint32_t containing batch size of document result sets or 0 for default. Default is 100. ...

solution: build mongorover by yourself

git clone https://github.com/mongodb-labs/mongorover.git cd mongorover luarocks build mongorover

It should build and install new version of mongorover driver that will work properly.

-- Alexey Stroganov

drgnjoon commented 5 years ago

still not work.. have any solutions?

drgnjoon commented 5 years ago

error fixed..

this repo is outdated version, so need to setup old version of mongo-c-driver.(1.2.0)