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

Re: (ITS#6507) backglue and paged results issue

On Wed, 7 Apr 2010 00:54:46 +0200 (CEST), masarati@aero.polimi.it wrote:
>> Le 06/04/2010 20:55, masarati@aero.polimi.it a écrit :
>>> When requesting paged results control on glued databases, if a database
>>> (either
>>> superior or subordinate) returns one page that ends with the last
>>> corresponding
>>> entry in that database, the resulting cookie is empty.  Thus, the
>>> returned to the client corresponds to the final result of a paged
>>> response.
>>> However, other databases may have returned data.  A fix is being
>>> designed.  p.
>> Your fix for this problem works well in my tests.
>> Under the same subject, another problem arises:
>> Consider this :
>> - back null
>> ---- back ldap 1 returning 3 results to a search
>> ---- back ldap 2 returning 3 results to a search
>> And you search "back null" with a page size of 2:
>> - The first response contains 2 results from "back ldap 1" and a correct
>> cookie.
>> - The second response contains 1 result from "back ldap 1" and 1 result
>> from "back ldap 2", and another correct cookie.
>> - The third request, however, goes back to "back ldap 1", and returns
>> the same results as the first response.
>> - And so on... forever.
>> As I mentioned, it seems that to solve this problem we would have to tie
>> a paged results cookie to a particular backend under glue...
> Should work now.  The issue was related to the fact that unless the
> subordinate backends are local, the response to pgaed results has not
> parsed into the connection structure...

Yes, much better now.

Just one weird case left. Considering the same setup as described above
(back null with 2 back ldap glued underneath): a search with pagedResults
and a page size of 3 (the exact number of results returned by each back
ldap), we get:
- a first page with the 3 results from back ldap 1
- a second page with 3 results from back ldap 2 (so far, so good)
- but then this last result also has a pagedResults cookie, and the search
can go on and on, returning the same 2nd page.

Presumably this is related to the patch allowing pagedResults to cross two
databases. If the first returns an empty cookie (no more results), a new
cookie is added. However, this should not be done if the last database
returns no more results.