directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carlo Accorsi (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DIRSERVER-1854) Indexes for entry corrupted after replace modification
Date Fri, 14 Jun 2013 17:18:20 GMT

    [ https://issues.apache.org/jira/browse/DIRSERVER-1854?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13683545#comment-13683545
] 

Carlo Accorsi commented on DIRSERVER-1854:
------------------------------------------

I will send a complete configuration along with a code example but this is what seems to cause
the issue. 

After a modification (containing multiple mods on indexed attributes) at least one of the
indexes gets corrupted. 
After the modification, a search for displayName=* does not include the entry that's just
be modified. 
The cn=* still returns the the entry that's just been modified  However if i modify second
entry, with a single modification to the displayName
this also disappears from the index. 

Here is the code snip. 
		
			LdapConnection  connection = obj.setupConnection("localhost",10389,"uid=admin,ou=system","secret");
			// search for (displayName=*) here returns 3 values
	
		        Entry entry = connection.lookup("uid=1370924523315,ou=users,ou=int,o=cpro");
			Dn dn = entry.getDn();

			Attribute atCommonNameNew = new DefaultAttribute("cn",new String[]{"Test User XYZ"}); //
value changed
			Attribute atDisplayNameNew = new DefaultAttribute("displayName",new String[]{"Test User
XYZ"}); // value changed
			
			
			Modification[] mods = new Modification[2];
			
			mods[0] = new DefaultModification( ModificationOperation.REPLACE_ATTRIBUTE, atCommonNameNew);
			mods[1] = new DefaultModification( ModificationOperation.REPLACE_ATTRIBUTE, atDisplayNameNew);
			
			connection.modify(dn, mods);
			// search for (displayName=*) here returns 2 values

                
> Indexes for entry corrupted after replace modification
> ------------------------------------------------------
>
>                 Key: DIRSERVER-1854
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-1854
>             Project: Directory ApacheDS
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 2.0.0-M12
>         Environment: Windows x64, Java 1.6.0_32, ApacheDS API 1.0.0-M17
>            Reporter: Carlo Accorsi
>
> We have several attributes indexed on a custom partition. The first time the entry is
created and saved, the attribute is searchable with a wildcard. For example, if there are
two entries with the following CN's: 
> cn: User One
> cn: User Two
> the search cursor for (cn=*) will return two entries. If the cn on one of the entries
is changed with a replace modification, (cn=*) will not include the entry in a result.  This
behavior is observed with other indexed attributes as well.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message