Closed
Bug 15759
Opened 25 years ago
Closed 25 years ago
Incorrect handling of 'Time limit exceeded'in search operations
Categories
(Directory :: LDAP Java SDK, defect, P3)
Directory
LDAP Java SDK
Tracking
(Not tracked)
RESOLVED
INVALID
People
(Reporter: Thomas.Beyer, Assigned: miodrag)
Details
I do a search with a certain time limit.
When the limit is reached, the LDAP server returns the entries found so far
and the error code 'time limit exceeded'.
The LDAPConnection.search method then just throws the exception
'Time to complete operation exceeded (85)', but does not return
the entries found so far.
'Time limit exceeded' should be handled in the same way as
'Size limit exceeded', which works fine.
The problem does not occur with the LDAP C SDK 3.0.
Just want to make sure on this one: Is the exception thrown from ld.search() or
res.next()?
Also, what is the batchSize here? If the batchSize is 0, then search is
synchronous and will wait for all results to be received. If time limit is
exceeded, search will throw the exception and you do not get back the results
object. You should not use batchSize=0 if there is a chance that size or time
limit can be exceeded. If you search with the batch size of 1 and exception is
thrown, then no entries were received anyway.
Thomas,
from the returned error code (85) LDAPException.LDAP_TIMEOUT, it is obvious that
you are using cons.setTimeLimit(milliseconds). No results are returned as
the timelimit parameter is interpreted as being in milliseconds rather than in
seconds, so it is too short.
The have server monitor the search time limit, cons.setServerTimeLimit(seconds)
should be called. When the server time limit is exceeded the LDAPException error
code is (3) LDAPException.TIME_LIMIT_EXCEEDED.
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•