RFR  JNDI timeout fails before timeout is reached
Alan.Bateman at oracle.com
Fri Nov 29 17:03:05 UTC 2013
On 19/11/2013 17:58, Ivan Gerasimov wrote:
> Hello all!
> Would you please help review a fix for the bug?
> It was reported that creating new InitialLdapContext() can fail with
> "javax.naming.NamingException: LDAP response read timed out, timeout
> used:30000ms", even though the specified timeout hadn't been elapsed.
> The fix was provided by the filer of the bug some time ago.
> Here's the webrev with this fix:
I haven't seen any replies to this but I've cc'ed Vinnie and Xuelei as
they are more familiar with this area.
If I understand correctly then the issue is that the timeout handling
doesn't take account of wakeups when aren't any BerDecoders to dequeue.
The changes mean it will retry the wait with a decreasing timeout until
a reply is received or the timeout elapses. That seems reasonable,
assuming the time doesn't change :-) You might find the code is a bit
clearer if you have a "remaining" time as that would allow you get rid
of timedOut, timeOut and endTime.
I see the patch doesn't come with a test. Is there any test
infrastructure for testing LDAP without require a complete server?
More information about the core-libs-dev