You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by "Qing, Hai (Paul PSW CMS R&D)" <ha...@hpe.com> on 2017/04/19 02:08:28 UTC
thread leak when do these
operations:ADD,DELETE,MODIFY,MOVE,RENAME,MOVE_AND_RENAME
Hi Sir,
I think there is a bug in the Apacheds server when did following operation:
ADD,DELETE,MODIFY,MOVE,RENAME,MOVE_AND_RENAME
These operation will cause thread leak. I checked the code. The interceptor's API has destroy method. However, the EventInterceptor didn't override that method. I think it should add method in the event interceptor,Like following:
@Override
public void destroy(){
executor.shutdown();
}
It should call interceptor's destroy method in the DefaultDirectoryService' shutdown method. such as:
public synchronized void shutdown() throws Exception
{
..................................
..............................
this.destoryInteceptors();
}
private void destoryInteceptors(){
for ( Interceptor interceptor : interceptors )
interceptor. destroy();
}
}
Thanks,
Hai
Re: thread leak when do these
operations:ADD,DELETE,MODIFY,MOVE,RENAME,MOVE_AND_RENAME
Posted by Emmanuel Lécharny <el...@gmail.com>.
Hi Qing,
you are most certainly right !
I have added your code suggestion in the server, I still have to run the
test, will do that tomottow morning (it's 4am here...)
Many thanks for the thorough analysis !
--
Emmanuel Lecharny
Symas.com
directory.apache.org