mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-12 10:54:48 +08:00
ITS#9555 Introduce a default operations timeout for back-asyncmeta
This commit is contained in:
parent
4005c53d89
commit
915e515970
@ -446,6 +446,8 @@ Operations can be
|
||||
|
||||
\fB<op> ::= bind, add, delete, modrdn, modify, compare, search\fP
|
||||
|
||||
By default, the timeout for all operations is 2 seconds.
|
||||
|
||||
See
|
||||
.B slapd\-meta(5)
|
||||
for details.
|
||||
|
@ -326,8 +326,10 @@ typedef struct a_metatarget_t {
|
||||
#define META_BACK_TGT_NOREFS(mt) META_BACK_TGT_ISSET( (mt), LDAP_BACK_F_NOREFS )
|
||||
#define META_BACK_TGT_NOUNDEFFILTER(mt) META_BACK_TGT_ISSET( (mt), LDAP_BACK_F_NOUNDEFFILTER )
|
||||
|
||||
#define META_BACK_CFG_MAX_PENDING_OPS 0x80
|
||||
#define META_BACK_CFG_MAX_PENDING_OPS 0x80
|
||||
#define META_BACK_CFG_MAX_TARGET_CONNS 0xFF
|
||||
#define META_BACK_CFG_DEFAULT_OPS_TIMEOUT 0x02
|
||||
|
||||
/* the interval of the timeout checking loop in microseconds
|
||||
* possibly make this configurable? */
|
||||
#define META_BACK_CFG_MAX_TIMEOUT_LOOP 0x70000
|
||||
|
@ -1177,7 +1177,7 @@ asyncmeta_back_cf_gen( ConfigArgs *c )
|
||||
|
||||
case LDAP_BACK_CFG_TIMEOUT:
|
||||
for ( i = 0; i < SLAP_OP_LAST; i++ ) {
|
||||
if ( mc->mc_timeout[ i ] != 0 ) {
|
||||
if ( mc->mc_timeout[ i ] != META_BACK_CFG_DEFAULT_OPS_TIMEOUT ) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -149,6 +149,10 @@ asyncmeta_back_db_init(
|
||||
mi->mi_nretries = META_RETRY_DEFAULT;
|
||||
mi->mi_version = LDAP_VERSION3;
|
||||
|
||||
for ( i = 0; i < SLAP_OP_LAST; i++ ) {
|
||||
mi->mi_timeout[ i ] = META_BACK_CFG_DEFAULT_OPS_TIMEOUT;
|
||||
}
|
||||
|
||||
for ( i = LDAP_BACK_PCONN_FIRST; i < LDAP_BACK_PCONN_LAST; i++ ) {
|
||||
mi->mi_conn_priv[ i ].mic_num = 0;
|
||||
LDAP_TAILQ_INIT( &mi->mi_conn_priv[ i ].mic_priv );
|
||||
|
Loading…
Reference in New Issue
Block a user