directory-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kiran Ayyagari <kayyag...@apache.org>
Subject Re: LdapNetworkConnection not thread-safe ?
Date Wed, 27 Jun 2012 15:54:46 GMT
it is not thread safe
a bit of history: earlier we made it thread safe, but later dropped
the thread safety features
                        it still supports the async feature though

On Wed, Jun 27, 2012 at 8:53 PM, Hendy Irawan <hendy@soluvas.com> wrote:
> Hi ApacheDS developers,
>
> I'm working on an open source project (
> https://github.com/soluvas/ldap-tools ) which uses LdapNetworkConnection
> using shared v1.0.0-M12. Several threads are running in parallel (using
> Akka), all using the same LdapNetworkConnection to delete entries.
> However in some cases it locks up (deadlock? race condition?) and the last
> logs I get is :
>
> ...
> 22:17:17 [NioProcessor-2] DEBUG o.a.m.f.codec.ProtocolCodecFilter -
> Processing a MESSAGE_RECEIVED for session 1
> 22:17:17 [ldap_cli-akka.actor.default-dispatcher-14] INFO
> o.soluvas.ldaptools.cli.PersonClear - Deleting
> uid=setsuna_hinagiku,ou=users,dc=berbatik,dc=com
> 22:17:17 [ldap_cli-akka.actor.default-dispatcher-24] INFO
> o.soluvas.ldaptools.cli.PersonClear - Deleting
> uid=rumah_amal_salman_itb,ou=users,dc=berbatik,dc=com
> 22:17:17 [NioProcessor-2] DEBUG o.a.m.f.codec.ProtocolCodecFilter -
> Processing a MESSAGE_RECEIVED for session 1
> 22:17:17 [ldap_cli-akka.actor.default-dispatcher-18] INFO
> o.soluvas.ldaptools.cli.PersonClear - Deleting
> uid=setyo_rini,ou=users,dc=berbatik,dc=com
> 22:17:17 [NioProcessor-2] DEBUG o.a.m.f.codec.ProtocolCodecFilter -
> Processing a MESSAGE_RECEIVED for session 1
> 22:17:17 [ldap_cli-akka.actor.default-dispatcher-1] INFO
> o.soluvas.ldaptools.cli.PersonClear - Deleting
> uid=pipit_nugroho,ou=users,dc=berbatik,dc=com
> 22:17:17 [ldap_cli-akka.actor.default-dispatcher-15] INFO
> o.soluvas.ldaptools.cli.PersonClear - Deleting
> uid=yuliana_riris_basaria,ou=users,dc=berbatik,dc=com
> 22:17:17 [NioProcessor-2] DEBUG o.a.m.f.codec.ProtocolCodecFilter -
> Processing a MESSAGE_RECEIVED for session 1
> 22:17:17 [ldap_cli-akka.actor.default-dispatcher-16] INFO
> o.soluvas.ldaptools.cli.PersonClear - Deleting
> uid=setia_budi,ou=users,dc=berbatik,dc=com
> 22:17:17 [NioProcessor-2] DEBUG o.a.m.f.codec.ProtocolCodecFilter -
> Processing a MESSAGE_RECEIVED for session 1
> 22:17:17 [NioProcessor-2] DEBUG o.a.m.f.codec.ProtocolCodecFilter -
> Processing a MESSAGE_RECEIVED for session 1
> 22:17:17 [NioProcessor-2] DEBUG o.a.m.f.codec.ProtocolCodecFilter -
> Processing a MESSAGE_RECEIVED for session 1
> 22:17:17 [NioProcessor-2] DEBUG o.a.m.f.codec.ProtocolCodecFilter -
> Processing a MESSAGE_RECEIVED for session 1
> 22:17:17 [NioProcessor-2] DEBUG o.a.m.f.codec.ProtocolCodecFilter -
> Processing a MESSAGE_RECEIVED for session 1
> 22:17:17 [NioProcessor-2] DEBUG o.a.m.f.codec.ProtocolCodecFilter -
> Processing a MESSAGE_RECEIVED for session 1
> 22:17:17 [NioProcessor-2] DEBUG o.a.m.f.codec.ProtocolCodecFilter -
> Processing a MESSAGE_RECEIVED for session 1
> 22:17:17 [NioProcessor-2] DEBUG o.a.m.f.codec.ProtocolCodecFilter -
> Processing a MESSAGE_RECEIVED for session 1
> 22:17:17 [NioProcessor-2] DEBUG o.a.m.f.codec.ProtocolCodecFilter -
> Processing a MESSAGE_RECEIVED for session 1
> 22:17:17 [NioProcessor-2] DEBUG o.a.m.f.codec.ProtocolCodecFilter -
> Processing a MESSAGE_RECEIVED for session 1
>
> I also experience similar issues doing concurrent add()s.
>
> Is LdapNetworkConnection meant to be thread-safe? Or should I just use
> separate LdapConnection for each thread?
>
>
> --
> Hendy Irawan - on Twitter <http://twitter.com/hendybippo> - on
> LinkedIn<http://id.linkedin.com/in/hendyirawan>
> Web Developer | Bippo Indonesia <http://www.bippo.co.id/> | Akselerator
> Bisnis | Bandung



-- 
Kiran Ayyagari

Mime
View raw message