mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-21 03:10:25 +08:00
ITS#8226 optimization
Don't release read txn unless there has actually been a new write txn
This commit is contained in:
parent
9827569ff0
commit
221dd43399
@ -1125,7 +1125,10 @@ loop_continue:
|
|||||||
if ( moi == &opinfo && !wwctx.flag && mdb->mi_rtxn_size ) {
|
if ( moi == &opinfo && !wwctx.flag && mdb->mi_rtxn_size ) {
|
||||||
wwctx.nentries++;
|
wwctx.nentries++;
|
||||||
if ( wwctx.nentries >= mdb->mi_rtxn_size ) {
|
if ( wwctx.nentries >= mdb->mi_rtxn_size ) {
|
||||||
|
MDB_envinfo ei;
|
||||||
wwctx.nentries = 0;
|
wwctx.nentries = 0;
|
||||||
|
mdb_env_info(mdb->mi_dbenv, &ei);
|
||||||
|
if ( ei.me_last_txnid > mdb_txn_id( ltid ))
|
||||||
mdb_rtxn_snap( op, &wwctx );
|
mdb_rtxn_snap( op, &wwctx );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user