Issue #456 has been updated by David Coutadeur.
Hi Sebastien,
> what is you position about using '-s' or '-a' to call an async task? Seems
> this bug occurs only if an async task is called with '-s'.
The bug is indeed due to the use of '-s' for an async task, so it is not really
a bug. But what is strange is that this anormal behaviour is not directly
linked to the use of this "-s" option.
I imagine that the correct behaviour with this "-s" option would be either :
1. error: you can't use -s when no synchronous task is defined, or
2. nothing special happens : there is no synchronous task defined, so nothing
to do
> - you catch all kind of exception which is probably "too much" : cannot you
> just catch the right exception type or add a test (exception handling should
> be avoided if possible because it breaks the Java standard stack management)
I am sorry : I am really not a java expert. The system of try/catch I wrote is
certainly not complete and should be adapted. But the try/catch was not what I
wanted to underline.
> - is the catch block the only modification that you've included
The try/catch was juste a consequence of what I have added. (I was told it is
mandatory, so I wrote it fastly... Too fastly maybe...)
The most important line changing everything is :
while(cursor.next()){
instead of
for(SearchResponse sr : cursor) {
For a reason I don't understand yet, the object in the second case sometimes
does not seem to be considered as iterable. (so the loop is immediatly exited)
The while loop seems to work in any case.
Thank you for your investigation.
----------------------------------------
Bug #456: async ldap source problem : Empty or non existant source (no IDs
found)
http://tools.lsc-project.org/issues/456
Author: David Coutadeur
Status: Assigned
Priority: Normal
Assigned to: Sébastien Bahloul
Category: Core
Target version: 2.0
Problem in version: 2.0-SNAPSHOT
The definitive context of the problem is not completely defined, because the
same config and version of lsc (branch 2.0) seem to produce or not the bug.
The bug is:
Empty or non existant source (no IDs found)
with this configuration:
<pre> <asyncLdapSourceService>
<name>ldap-src-service</name>
<connection reference="ldap-src-conn" />
<baseDn>ou=people,dc=my-domain,dc=com</baseDn>
<pivotAttributes>
<string>myUniqueId</string>
</pivotAttributes>
<fetchedAttributes>
<string>cn</string>
<string>sn</string>
<string>uid</string>
<string>myUniqueId</string>
</fetchedAttributes>
<getAllFilter>(objectClass=inetorgperson)</getAllFilter>
<getOneFilter>(&(objectClass=inetorgperson)(myUniqueId={agriUniqueId}))</getOneFilter>
<cleanFilter>(&(objectClass=inetorgperson)(myUniqueId={agriUniqueId}))</cleanFilter>
<serverType>OpenLDAP</serverType>
</asyncLdapSourceService>
</pre>
The problem identified occurs in SyncReplSourceService.java
Sometimes, the for loop:
for(SearchResponse sr : cursor) {
is looked through, sometimes it is not, because of the iterable (or not) nature
of the Cursor<SearchResponse>.
The problem seems fixed (every time) with the patch attached to this ticket,
but more testing must be done.
--
You have received this notification because you have either subscribed to it,
or are involved in it.
To change your notification preferences, please click here:
http://tools.lsc-project.org/my/account
_______________________________________________________________
Ldap Synchronization Connector (LSC) - http://lsc-project.org
lsc-dev mailing list
[email protected]
http://lists.lsc-project.org/listinfo/lsc-dev