ITS#6365 wait for read locks in tool mode

Fix commit e5b96f2c76
This commit is contained in:
Howard Chu 2013-02-07 18:23:25 +00:00
parent 1c99711ede
commit 853b9d1335

View File

@ -529,7 +529,13 @@ shm_retry:
}
if ( !quick ) {
TXN_BEGIN(bdb->bi_dbenv, NULL, &bdb->bi_cache.c_txn, DB_READ_COMMITTED | DB_TXN_NOWAIT);
int txflag = DB_READ_COMMITTED;
/* avoid deadlocks in server; tools should
* wait since they have no deadlock retry mechanism.
*/
if ( slapMode & SLAP_SERVER_MODE )
txflag |= DB_TXN_NOWAIT;
TXN_BEGIN(bdb->bi_dbenv, NULL, &bdb->bi_cache.c_txn, txflag);
}
entry_prealloc( bdb->bi_cache.c_maxsize );