You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by "Emmanuel Lecharny (JIRA)" <ji...@apache.org> on 2010/06/01 01:39:40 UTC
[jira] Resolved: (DIRSERVER-1393) Modification with multiple items
are not considered as atomic operation
[ https://issues.apache.org/jira/browse/DIRSERVER-1393?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Emmanuel Lecharny resolved DIRSERVER-1393.
------------------------------------------
Resolution: Fixed
This has been fixed a while back.
The following test shows that it's fixed :
ModifyMultipleChangesIT.testModifyMultipleChangeDeleteAddSnInMust()
{
LdapContext sysRoot = getSystemContext( service );
createData( sysRoot );
// Try to delete and add the SN which is in MUST
ModificationItem[] mods = new ModificationItem[2];
Attribute snOld = new BasicAttribute( "sn", "Amos" );
mods[0] = new ModificationItem( DirContext.REMOVE_ATTRIBUTE, snOld );
Attribute snNew = new BasicAttribute( "sn", "TAmos" );
mods[1] = new ModificationItem( DirContext.ADD_ATTRIBUTE, snNew );
sysRoot.modifyAttributes( RDN_TORI_AMOS, mods );
// Verify that the attribute value has been added
Attributes attrs = sysRoot.getAttributes( RDN_TORI_AMOS );
Attribute attr = attrs.get( "sn" );
assertNotNull( attr );
assertTrue( attr.contains( snNew.get() ) );
assertEquals( 1, attr.size() );
}
( in core-integ, operations/modify)
> Modification with multiple items are not considered as atomic operation
> -----------------------------------------------------------------------
>
> Key: DIRSERVER-1393
> URL: https://issues.apache.org/jira/browse/DIRSERVER-1393
> Project: Directory ApacheDS
> Issue Type: Bug
> Components: ldap
> Affects Versions: 1.5.4
> Reporter: Stefan Seelmann
> Assignee: Emmanuel Lecharny
> Priority: Critical
> Fix For: 2.0.0-RC1
>
>
> Having the following entry:
> ---------------------------------------------------------------------
> dn: cn=test,ou=Users,dc=example,dc=com
> objectClass: inetOrgPerson
> objectClass: organizationalPerson
> objectClass: person
> objectClass: top
> cn: test
> sn: test
> ---------------------------------------------------------------------
> When trying to change the "sn" must attribute with following modification sequence fails with error " [15:48:05] ERROR [org.apache.directory.server.core.schema.SchemaInterceptor] - Trying to remove a required attribute: sn".
> ---------------------------------------------------------------------
> dn: cn=test,ou=Users,dc=example,dc=com
> changetype: modify
> delete: sn
> sn: test
> -
> add: sn
> sn: test2
> -
> ---------------------------------------------------------------------
> Order of add/delete or delete/add doesn't matter. Using "replace" works.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.