#47426 move compute_idletimeout out of handle_pr_read_ready
Closed: Fixed None Opened 6 years ago by rmeggins.

compute_idletimeout is an expensive function - this can call internal searches which can trigger a lot of activity - it is called from the main slapd_daemon loop so it should be as fast as possible - we need to figure out some way to call this from a worker thread - perhaps call compute_idletimeout during the first operation handled by a worker thread - otherwise, if client somehow opens a connection with no operation, just use a config param instead of a calculated value


There are two cases where conn->c_dn == NULL - user did an explicit BIND as dn="" - user did an operation without binding first - for example, user does a search request without binding first - there is an example of this in our code - the function cb_ping_farm() in the chainingdb code. A user may submit any LDAP request without first having to do a BIND. I think this case should be treated as an anonymous bind, which means doing the anon_limits stuff.

Replying to [comment:4 rmeggins]:

There are two cases where conn->c_dn == NULL - user did an explicit BIND as dn="" - user did an operation without binding first - for example, user does a search request without binding first - there is an example of this in our code - the function cb_ping_farm() in the chainingdb code. A user may submit any LDAP request without first having to do a BIND. I think this case should be treated as an anonymous bind, which means doing the anon_limits stuff.

Change has been made, and new patch attached.

git merge ticket47426
Updating 39f5eda..ed83a78
Fast-forward
ldap/servers/slapd/connection.c | 21 ++++++++++
ldap/servers/slapd/daemon.c | 78 +++++++--------------------------------
ldap/servers/slapd/pblock.c | 12 ++++++
ldap/servers/slapd/slap.h | 4 +-
4 files changed, 50 insertions(+), 65 deletions(-)

git push origin master
39f5eda..ed83a78 master -> master

commit ed83a78
Author: Mark Reynolds mreynolds@redhat.com
Date: Wed Jul 31 19:19:34 2013 -0400

git merge ticket47426
Updating ed83a78..a4daf1a
Fast-forward
ldap/servers/slapd/connection.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

git push origin master

ed83a78..a4daf1a master -> master

commit a4daf1a
Author: Mark Reynolds mreynolds@redhat.com
Date: Thu Aug 1 15:05:16 2013 -0400

Pushed to 389-ds-base-1.3.1:
f5ee5b8..89b78da 389-ds-base-1.3.1 -> 389-ds-base-1.3.1
commit 89b78da25aa79101d6b43529a7486c64feb5eda6
commit d4f9c40d6d7f36b31e81c2326036a65229fe470f

Pushed to 389-ds-base-1.2.11:
7e7a85f..a184bbb 389-ds-base-1.2.11 -> 389-ds-base-1.2.11
commit a184bbb
commit ed408d8

Metadata Update from @mreynolds:
- Issue assigned to mreynolds
- Issue set to the milestone: 1.3.2 - 08/13 (August)

2 years ago

Login to comment on this ticket.

Metadata