[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: Proposed patch to support: draft-zeilenga-ldap-c-api-concurrency

>   I would like to propose a patch to the OpenLDAP
> C APIs to support the operation thread safe features
> described in the draft-zeilenga-ldap-c-api-concurrency
> drafts.
> The enhancements add upwardly compatible interfaces
> and should have no behavioral regressions w.r.t. any
> existing libldap interfaces.
> The new concurrency APIs include:
>      ldap_dup and ldap_destroy
> They are described in more detail in the concurrency draft
> and in the applicable man paged.  The related feature
> options are also provided.
> Additionally I would like to propose 1 new public error API
>      ldap_get_lderror
> which returns all three ldap_get_option results:
> in a single API, and 1 new depreciated public API:
>     ldap_get_lderrno
> which performs almost the same function as ldap_get_error
> but does so in a mt-unsafe manner, but that is compatible with
> Mozilla's libldap API of the same name.
> The point of the two new error APIs is to provide a transition
> path from Mozilla libldap users that still use ldap_get_lderrno to either
> a similar API that obeys OpenLDAP like practices (ldap_get_error)
> or as a transition until any existing code can be converted away from
> ldap_get_lderrno to just using ldap_get_options as needed.
> The patch includes a new test case to test the new functionality
> and man pages.
> The new test case needs additional work for some
> of the threading models.  Any input here is requested, since
> I do not have testing resources for all the threading combination
> and do not have the ability to test the Windows model.
> I am looking forward to any and all comments.
> I plan to submit a formal ITS with a finalized version of changes once
> any and all issues are thrashed out and resolved to a level that
> they are acceptable for integration.
> Just for the record:
> This patch file is derived from OpenLDAP Software. All of the
> modifications to
> OpenLDAP Software represented in the following patch(es) were developed
> by Oracle Corporation.Oracle Corporation has not assigned rights and/or
> interest in this work to any party. I, Douglas Leavitt am authorized by
> Oracle Corporation,
> my employer, to release this work under the following terms.
> The initial version of my proposed patch can be found here:
> http://cr.opensolaris.org/~djl/openldap-codereview
> This includes a
>      diff -U of the full patch (/diffU)
>      a webrev diff  (/webrev) for on-line review
>      and a tar ball image of the OpenLDAP HEAD as of 8/13/10
>        with the current patch applied.
> Thank you for you consideration, and I look forward
> to any and all comments.

Hi.  Your submission looks quite interesting.  In fact, I've been trying
to track down an issue for a while, which appeared to be a nasty
mishandled concurrency issue of libldap within the proxy backends. 
Looking at your patch, we seem to have been touching similar portions of
code.  Our modifications are not final yet, as I'm waiting for the
response of some apparently quite time consuming tests.  In any case,
we'll need to coordinate a bit when committing these changes.  Just for
the records, the whole thing started as ITS#6574.  In any case, I'll start
reviewing your patch soon.

Thanks, p.