mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-06 10:46:21 +08:00
release lock as early as possible; deferring referral checking in searches may reduce the amount of dynamic entry generation
This commit is contained in:
parent
908aaa5107
commit
7d531d1416
@ -598,6 +598,8 @@ ldif_back_referrals( Operation *op, SlapReply *rs )
|
|||||||
entry = (Entry *)get_entry( op, &ni->li_base_path );
|
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_dn = odn;
|
||||||
op->o_req_ndn = ondn;
|
op->o_req_ndn = ondn;
|
||||||
|
|
||||||
@ -643,12 +645,11 @@ ldif_back_referrals( Operation *op, SlapReply *rs )
|
|||||||
rs->sr_matched = NULL;
|
rs->sr_matched = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
ldap_pvt_thread_mutex_unlock( &ni->li_mutex );
|
|
||||||
|
|
||||||
return rc;
|
return rc;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ldap_pvt_thread_mutex_unlock( &ni->li_mutex );
|
||||||
|
|
||||||
if ( is_entry_referral( entry ) ) {
|
if ( is_entry_referral( entry ) ) {
|
||||||
/* entry is a referral */
|
/* entry is a referral */
|
||||||
BerVarray refs = get_entry_referrals( op, entry );
|
BerVarray refs = get_entry_referrals( op, entry );
|
||||||
@ -677,8 +678,6 @@ ldif_back_referrals( Operation *op, SlapReply *rs )
|
|||||||
entry_free( entry );
|
entry_free( entry );
|
||||||
}
|
}
|
||||||
|
|
||||||
ldap_pvt_thread_mutex_unlock( &ni->li_mutex );
|
|
||||||
|
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user