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

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