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

Re: commit: ldap/clients/tools ldapsearch.c

At 10:39 AM 6/18/2004, Pierangelo Masarati wrote:

>> At 12:09 AM 6/18/2004, Pierangelo Masarati wrote:
>>>> Log Message:
>>>> Fix a limit typo
>>>> Use 0 not maxint when 'none' is selected.
>>>this was intended as a means to provide a helper to hit the hard instead
>>>of the soft limits.  See ITS#3136 for a background.  In fact, if one sets
>>>size.soft=100 size,hard=unlimited, then, to hit the unlimited case one
>>>needs to require a size limit.  There is no notion of unlimited size in
>>>the client library, nor in the protocol, so my idea was to use the max
>>>integer allowed by the protocol, and add a shortcut string in ldapsearch
>>>-z, -l to hit this value.  Maybe a different keyword would be better,
>>> e.g.
>> Well, from a protocol perspective, 0 means no limit (e.g., unlimited).
>"unlimited" and "no limit explicitly requested" is rather different;

I think not. The word "unlimited" means "without limit" or,
equivalently, "with no limit".

If you view that there is a difference between no limit and
unlimited, then I would argue that the protocol provides no
mechanism to request "unlimit".  The protocol allows the
client to request no limit (0) or to request a limit

>currently, we interpret 0 as "no limit explicitly requested",
>resulting in soft limits being used.  This is the interpretation slapd currently uses.

In slapd(8), if the user requests sizeLimit=0, they get the
soft limit.   If they request sizeLimit>0, they get that limit
as long as it is not greater than the hard limit otherwise
an error occurs.

It would be nice to provide a mechanism for the client to
ask for the hard limit (which could be unlimited), for this,
I think we should treat a request for maxint sizelimit
as a request for the hard limit (the maximum the server was
configured to allow to be returned).  Hence my suggestion
to add a "max" keyword to facilitate this.

>> I think what you're trying to do is not to hit the "unlimited
>> case" but to hit the hard limit.
>> Maybe add a "max" case which means maxInt.
>>>Otherwise one has to manually specify the largest value atoi
>>>(now strtol) can accept.
>> Seems approproriate.
>Pierangelo Masarati
>    SysNet - via Dossi,8 27100 Pavia Tel: +390382573859 Fax: +390382476497