release lock as early as possible; deferring referral checking in searches may reduce the amount of dynamic entry generation

This commit is contained in:
Pierangelo Masarati 2005-03-29 23:56:23 +00:00
parent 908aaa5107
commit 7d531d1416

View File

@ -598,6 +598,8 @@ ldif_back_referrals( Operation *op, SlapReply *rs )
entry = (Entry *)get_entry( op, &ni->li_base_path );
}
ldap_pvt_thread_mutex_unlock( &ni->li_mutex );
op->o_req_dn = odn;
op->o_req_ndn = ondn;
@ -643,12 +645,11 @@ ldif_back_referrals( Operation *op, SlapReply *rs )
rs->sr_matched = NULL;
}
ldap_pvt_thread_mutex_unlock( &ni->li_mutex );
return rc;
}
ldap_pvt_thread_mutex_unlock( &ni->li_mutex );
if ( is_entry_referral( entry ) ) {
/* entry is a referral */
BerVarray refs = get_entry_referrals( op, entry );
@ -677,8 +678,6 @@ ldif_back_referrals( Operation *op, SlapReply *rs )
entry_free( entry );
}
ldap_pvt_thread_mutex_unlock( &ni->li_mutex );
return rc;
}