directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefan Seelmann (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DIRSERVER-1393) Modification with multiple items are not considered as atomic operation
Date Mon, 10 Aug 2009 22:07:14 GMT

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

Stefan Seelmann commented on DIRSERVER-1393:
--------------------------------------------

The value to delete exists, so an no_such_value error is not valid. The only problem is the
schema violation.

Howerver IMO the schema check should only be done at the end of the modification, when all
modification items are applied.

Two similar examples:

1st) I want to add an object class which contains must attributes that don't yet exist in
the entry. The modifications can't be done one be one, only all together

--------------------------------------------------------------------- 
dn: cn=test,ou=Users,dc=example,dc=com
changetype: modify
add: objectClass
objectClass: posixAccount
-
add: gidNumber
gidNumber: 1000
-
add: homeDirectory
homeDirectory: /home/test
-
add: uid
uid: test
-
add: uidNumber
uidNumber: 1000
-
--------------------------------------------------------------------- 

2nd) The other way around: I want to delete the posixAccount objectClass, this could only
be done by deleting all the attributes in the same modification


--> So my conclusion is that the schema check must be done after all modification items
are applied to the entry.

> 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: 1.5.5
>
>
> 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.


Mime
View raw message