AttributeDescription *mi_ad_monitorUpdateRef;
AttributeDescription *mi_ad_monitorRuntimeConfig;
AttributeDescription *mi_ad_monitorSuperiorDN;
+ AttributeDescription *mi_ad_monitorConnectionOpsAsync;
/*
* Generic description attribute
bv.bv_len = snprintf( buf, sizeof( buf ), "%ld", c->c_n_ops_completed );
attr_merge_one( e, mi->mi_ad_monitorConnectionOpsCompleted, &bv, NULL );
+ bv.bv_len = snprintf( buf, sizeof( buf ), "%ld", c->c_n_ops_async );
+ attr_merge_one( e, mi->mi_ad_monitorConnectionOpsAsync, &bv, NULL );
+
bv.bv_len = snprintf( buf, sizeof( buf ), "%ld", c->c_n_get );
attr_merge_one( e, mi->mi_ad_monitorConnectionGet, &bv, NULL );
"NO-USER-MODIFICATION "
"USAGE dSAOperation )", SLAP_AT_FINAL|SLAP_AT_HIDE,
offsetof(monitor_info_t, mi_ad_monitorSuperiorDN) },
+ { "( 1.3.6.1.4.1.4203.666.1.55.31 "
+ "NAME 'monitorConnectionOpsAsync' "
+ "DESC 'monitor number of asynchronous operations in execution within the connection' "
+ "SUP monitorCounter "
+ "NO-USER-MODIFICATION "
+ "USAGE dSAOperation )", SLAP_AT_FINAL|SLAP_AT_HIDE,
+ offsetof(monitor_info_t, mi_ad_monitorConnectionOpsAsync) },
{ NULL, 0, -1 }
};
/* Don't timeout a slow-running request or a persistent
* outbound connection.
*/
- if(( c->c_n_ops_executing && !c->c_writewaiter)
+ if((( c->c_n_ops_executing || c->c_n_ops_async ) && !c->c_writewaiter)
|| c->c_conn_state == SLAP_C_CLIENT ) {
continue;
}
/* Don't close a slow-running request or a persistent
* outbound connection.
*/
- if(( c->c_n_ops_executing && !c->c_writewaiter)
+ if((( c->c_n_ops_executing || c->c_n_ops_async ) && !c->c_writewaiter)
|| c->c_conn_state == SLAP_C_CLIENT ) {
continue;
}
c->c_n_ops_executing = 0;
c->c_n_ops_pending = 0;
c->c_n_ops_completed = 0;
+ c->c_n_ops_async = 0;
c->c_n_get = 0;
c->c_n_read = 0;
LDAP_STAILQ_REMOVE( &conn->c_ops, op, Operation, o_next);
LDAP_STAILQ_NEXT(op, o_next) = NULL;
- conn->c_n_ops_executing--;
+ conn->c_n_ops_async--;
conn->c_n_ops_completed++;
connection_resched( conn );
if ( lock )
*/
slap_sl_mem_setctx( ctx, NULL );
ldap_pvt_thread_mutex_lock( &conn->c_mutex );
+ conn->c_n_ops_executing--;
+ conn->c_n_ops_async++;
connection_resched( conn );
ldap_pvt_thread_mutex_unlock( &conn->c_mutex );
return NULL;
long c_n_ops_executing; /* num of ops currently executing */
long c_n_ops_pending; /* num of ops pending execution */
long c_n_ops_completed; /* num of ops completed */
+ long c_n_ops_async; /* mum of ops currently executing asynchronously */
long c_n_get; /* num of get calls */
long c_n_read; /* num of read calls */
conn->c_n_ops_executing = 0;
conn->c_n_ops_pending = 0;
conn->c_n_ops_completed = 0;
+ conn->c_n_ops_async = 0;
conn->c_n_get = 0;
conn->c_n_read = 0;