Commit 4840d03e authored by Nadezhda Ivanova's avatar Nadezhda Ivanova Committed by Quanah Gibson-Mount
Browse files

ITS#9555 Introduce a default operations timeout for back-asyncmeta

parent 3c9b79e4
......@@ -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 );
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment