[Date Prev][Date Next]
Pooling connections in back-ldap/meta
I brought up the subject on the -software list, and Howard pointed me back to
Basically, because I would like to use ldap_enable_cache within back-ldap,
connections to the remote LDAP server need to be done with the same LDAP
It seems to me that (perhaps) a new ldapinfo struct is created for each new
connection to slapd, therefore it never finds old connections to re-use.
So, some questions:
- am I right in assuming that a new ldapinfo struct is created for each new
connection to slapd? Is li->conntree a pointer to a global object, or is
there only one distinct conntree per li?
- if so, is there any reason in back-ldap why the same ldapconn structure
should not be essentially made global? Would this require lots more locks
every time it's used anywhere, to avoid threading problems? (I see there are
- what would be the best place to store such a global connection(-pool)? I am
not yet familiar enough with slapd's internals to know where to put this...
Any help much appreciated - getting this pooling working is a pretty high
priority for me as I need it working in the next few days -- and I'll submit
any patches I come up with.