[OGo-XML-RPC] limitation on XML-RPC result size? experiencing incomplete result sets

Damon Hart xmlrpc@opengroupware.org
Mon, 23 Oct 2006 12:09:16 -0400


Hi all -

Is there an inherent limit on records contained in or other implicit
filtering applied to the result set returned to an XML-RPC query?

I'm currently migrating from an old FC1 OGo installation to FC5 OGo
1.1 (trunk) and I'm perplexed because I'm receiving apparently
incomplete result sets from XML-RPC search requests to the new server.

We maintain notations in person comment fields starting with 'X!' to
indicate relevant mailing lists or areas of interest. Part of a Python
XML-RPC script to assemble lists issues the following request:

result = server.person.fetch(
           {
             'qualifier'      : "comment like '*X!*'",
             'sortOrderings' : ["name","firstname"],
           }
         )

There's a Bryan Tucker record in our database, company_id = 1560250,
with X!P in his comment field which should match this qualifier, and
his record is returned when the script is run against the old
installation. On the new installation, however, "Bryan Tucker" is not
returned in the result set even though a number of other valid records
are indeed returned (there seem to be a large number of expected
records missing other than Bryan Tucker.) The problem is not an issue
of data migration or permissions because the qualifier can be altered
to "name like 'Tucker'" and the record in question is returned.

Based on some earlier posts, I figured perhaps the correct form of the
qualifier had changed between the two OGo versions, so I turned on
database statement logging and looked at how the XML-RPC request was
transformed into a database query.

The initial query was exactly as expected:

SELECT DISTINCT t2.company_id
 FROM  company_info t1, person t2
 WHERE ((( LOWER(t1.comment) LIKE '%x!%'  ))
           AND (t2.db_status <> 'archived'))
       AND ((t2.is_template_user IS NULL)
             OR (t2.is_template_user = 0))
       AND t2.company_id = t1.company_id

In fact, running this query, copied verbatim out of the PostgreSQL
log, directly in psql returns a big result set which does include
1560250 (Bryan Tucker).

Reading further in the PostgreSQL log, the subsequent queries retrieve
the requested information by company_id:

SELECT t1.owner_id, t1.is_private, t1.is_readonly, t1.company_id
 FROM  person t1
 WHERE t1.company_id IN (628970,290030,617870,323180,623620, . . . )

SELECT t1.owner_id, t1.is_private, t1.is_readonly, t1.company_id
 FROM  person t1
 WHERE t1.company_id IN (299270,324100,628970,154640,185680, . . . )

However, 1560250 does not appear in any of these statements, even
though it was returned by the first query. It seems that ogo-xmlrpcd
effectively ignores this company_id (among others.) Has it been
filtered somehow or the result set truncated? Is there a relevant
configuration setting which could explain the difference between the
two OGo installations? Incidentally, this company_id does not show up
in the results of an equivalent fetchIds() XML-RPC request either.

Any help would be greatly appreciated,

Damon