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

RE: commit: ldap/libraries/libldap abandon.c ldap-int.h request.c result.c



I would appreciate some 3rd party confirmation of these patches. My own
testing gave inconsistent results; sometimes it appears that a packet got
lost and so both client and server are waiting for the other side to send
something. It never behaves this way while stepping thru gdb so it appears to
be timing-dependent. (This is when ldapadd is sending a large entry. So far
no problems with slapd sending large entries. As for why there is a
difference in behavior, I dunno.)

You need a moderately slow network connection for testing, otherwise you'll
never see  an EWOULDBLOCK condition on the writes. You want to send something
fairly big, keeping in mind that slapd's default max_incoming is 256K for
anonymous connections and 24M for authenticated. (note that the latter wasn't
true yesterday, as I found out while testing...) Thanks for any feedback.

> -----Original Message-----
> From: owner-openldap-devel@OpenLDAP.org
> [mailto:owner-openldap-devel@OpenLDAP.org]On Behalf Of Howard Chu

> This patch allows a single request to be in LDAP_REQST_WRITING state on a
> given LDAP session. If another call is made to ldap_send_server_request()
> while the current request is not fully written out, a further attempt to
> flush the pending request is made. If it completes, the new request will be
> handled immediately. Otherwise, LDAP_BUSY is returned and the new
> request is
> not handled.
>
> The rest of the writing is done in result.c's wait4msg() in the
> select loop.
>
> I'm not sure that abandon or unbind in the middle of a big request will be
> very graceful, but eventually they close the connection so it should be OK.
>
> -----Original Message-----
> From: owner-openldap-commit@OpenLDAP.org
> [mailto:owner-openldap-commit@OpenLDAP.org]On Behalf Of hyc@OpenLDAP.org
>
> Update of /repo/OpenLDAP/pkg/ldap/libraries/libldap
>
> Modified Files:
> 	abandon.c  1.27 -> 1.28
> 	ldap-int.h  1.133 -> 1.134
> 	request.c  1.82 -> 1.83
> 	result.c  1.70 -> 1.71
>
> Log Message:
> Fix ITS#1983, handle writing of large requests. Only one pending request is
> allowed per LDAP* handle. It works, but needs review.
>
>
>   -- Howard Chu
>   Chief Architect, Symas Corp.       Director, Highland Sun
>   http://www.symas.com               http://highlandsun.com/hyc
>   Symas: Premier OpenSource Development and Support
>
>
>

  -- Howard Chu
  Chief Architect, Symas Corp.       Director, Highland Sun
  http://www.symas.com               http://highlandsun.com/hyc
  Symas: Premier OpenSource Development and Support