when i written code to test performance when multi-threaded, i have one
thread for writing ,and two for reading. and i set the
env_flag=DB_CREATE|DB_INIT_MPOOL|DB_INIT_LOCK|DB_P RIVATE
when each thread reads writes 500,000 records
the console gives me messages like this:
performance: unexpected lock status: 6
Panic:Invalid argument region error detect
and if i set the records number to 10,000 , it works well
if i set the flag DB_PRIVATE off ,it works well
the writing thread causes no problem.
i show my gratitude for any help
If you are using multiple threads then you must specify DB_THREAD when
you open the environment. Also using DB_INIT_LOCK without DB_INIT_TXN
is not recommended since if you have locking on you can deadlock and
without a transaction log partial updates cannot be undone leading to
corruption of your data.