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

RE: (ITS#7698) Multiple Paged search requests on one connection fail



Thank you for your reply.

>>  Technically speaking, paged results consists of perfectly independent
operations from the protocol point of view

Yes but the results have not all been retrieved - only the first page full -
and further operations are needed to get the additional results. Hence paged
searches are not really independent but are linked by the cookie. The
results are supposed to remain available so that additional searches using
the same cookie can retrieve them. Every other LDAP server I have come
across allows multiple concurrent paged searches on a single connection.

The RFC does seem to allow the OpenLDAP behaviour but it seems extremely
restrictive to me. It should at least be well documented.

-----Original Message-----
From: Pierangelo Masarati [mailto:pierangelo.masarati@polimi.it] 
Sent: 17 September 2013 11:54
To: john.unsworth@cp.net
Cc: openldap-its@openldap.org
Subject: Re: (ITS#7698) Multiple Paged search requests on one connection
fail

On 09/17/2013 12:36 PM, john.unsworth@cp.net wrote:
> Full_Name: John Unsworth
> Version: 2.4.34
> OS: Windows 7
> URL: ftp://ftp.openldap.org/incoming/
> Submission from: (NULL) (81.139.153.176)
>
>
> If I issue multiple paged requests on a single connection then when 
> requesting the second page for the first request I receive 'paged 
> results cookie is invalid'. I suspect from looking at the code that 
> only a single paged request is allowed to be active at once on a
connection. Can someone confirm please.

Confirmed.

>
> parse_paged_cookie( Operation *op, SlapReply *rs )
>
> 	if ( ps->ps_cookieval.bv_len ) {
> ...
> 	} else {
> 		/* we're going to use ps_cookie */
> 		op->o_conn->c_pagedresults_state.ps_cookie = 0;
>
> It seems to me that the cookie is held against the connection (o_conn) 
> and not the operation. Surely this is wrong?

No, it's correct (at least, that's the intended behavior).  The operation
structure is only persistent for the duration of the operation, whereas the
connection structure persists for the duration of the connection.
Technically speaking, paged results consists of perfectly independent
operations from the protocol point of view, so persistent state is saved in
the connection structure.  Of course, multiple cookies could be stored, but
since paged results is inherently flawed, it was decided to handle it this
way.  Clients need to use a dedicated connection for search operations that
use the paged results control.

p.

--
Pierangelo Masarati
Associate Professor
Dipartimento di Scienze e Tecnologie Aerospaziali Politecnico di Milano