mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-02-14 08:13:10 -05:00
ITS#9620 Freeze cache while we search
This commit is contained in:
parent
60c219243b
commit
94b361ed45
1 changed files with 5 additions and 0 deletions
|
|
@ -215,6 +215,9 @@ monitor_back_search( Operation *op, SlapReply *rs )
|
|||
return rs->sr_err;
|
||||
}
|
||||
|
||||
/* Freeze the cache while we're using it */
|
||||
ldap_pvt_thread_rdwr_rlock( &mi->mi_cache_rwlock );
|
||||
|
||||
rs->sr_attrs = op->oq_search.rs_attrs;
|
||||
switch ( op->oq_search.rs_scope ) {
|
||||
case LDAP_SCOPE_BASE:
|
||||
|
|
@ -260,6 +263,8 @@ monitor_back_search( Operation *op, SlapReply *rs )
|
|||
monitor_cache_release( mi, e );
|
||||
}
|
||||
|
||||
ldap_pvt_thread_rdwr_runlock( &mi->mi_cache_rwlock );
|
||||
|
||||
rs->sr_attrs = NULL;
|
||||
rs->sr_err = rc;
|
||||
if ( rs->sr_err != SLAPD_ABANDON ) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue