mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-02-18 18:18:06 -05:00
ITS#10327 Allow lockless config_back_search() during server pause
The assumption is that the only reason it is allowed to run at this point is that it is called from the reconfiguration context anyway.
This commit is contained in:
parent
ace829788e
commit
489d4bf378
1 changed files with 10 additions and 2 deletions
|
|
@ -6952,10 +6952,17 @@ config_back_search( Operation *op, SlapReply *rs )
|
|||
CfBackInfo *cfb;
|
||||
CfEntryInfo *ce, *last = NULL;
|
||||
slap_mask_t mask;
|
||||
int paused = 0;
|
||||
|
||||
cfb = (CfBackInfo *)op->o_bd->be_private;
|
||||
|
||||
ldap_pvt_thread_rdwr_rlock( &cfb->cb_rwlock );
|
||||
if ( ldap_pvt_thread_pool_query( &connection_pool,
|
||||
LDAP_PVT_THREAD_POOL_PARAM_PAUSED, &paused ) ) {
|
||||
return -1;
|
||||
}
|
||||
if ( !paused ) {
|
||||
ldap_pvt_thread_rdwr_rlock( &cfb->cb_rwlock );
|
||||
}
|
||||
ce = config_find_base( cfb->cb_root, &op->o_req_ndn, &last, op );
|
||||
if ( !ce ) {
|
||||
if ( last )
|
||||
|
|
@ -6990,7 +6997,8 @@ config_back_search( Operation *op, SlapReply *rs )
|
|||
}
|
||||
|
||||
out:
|
||||
ldap_pvt_thread_rdwr_runlock( &cfb->cb_rwlock );
|
||||
if ( !paused )
|
||||
ldap_pvt_thread_rdwr_runlock( &cfb->cb_rwlock );
|
||||
send_ldap_result( op, rs );
|
||||
return rs->sr_err;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue