xiejiajun commented on pull request #4119:
URL: https://github.com/apache/zeppelin/pull/4119#issuecomment-842091804
> > The close method of LdapCtx will call the close method of LdapClient to
return the connection to the connection pool. If we rely on the GC mechanism,
although the Context object can be cleared, the connection will not be returned
normally. And a new connection will be created the next time we try to obtain a
connection, which will cause connection leakage.
>
> As bellow code of `LdapCtx::finalize()`, `LdapCtx::close()` called also
when it be released by GC.
>
> ```
> protected void finalize() {
> try {
> this.close();
> } catch (NamingException var2) {
> }
>
> }
> ```
>
> In both cases, the same function(`LdapCtx::close()`) is called, but I
don't understand that connection leaks occur only when released by the GC.
@cuspymd Thx, I re-tracked the source code according to your prompts. This
is indeed not the root cause of the connection leak. I will close this PR and
investigate other reasons for the connection leak.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]