directory-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Seelmann <seelm...@apache.org>
Subject Re: [Studio] add is done before delete on attribute value modification
Date Mon, 03 Aug 2009 17:14:16 GMT
Hi Martin,

Martin Alderson wrote:
> dn: cn=schema
> changetype: modify
> add: objectClasses
> objectClasses: ( 2.16.840.1.113730.3.2.2 NAME 'inetOrgPerson' [...new value...]
> -
> delete: objectClasses
> objectClasses: ( 2.16.840.1.113730.3.2.2 NAME 'inetOrgPerson' [...old value...]
> -

I guess you tried to run this LDIF with switched add/delete order? Just
to verify that it works.

> I guess the problem is specific to the schema as the the same objectClass can't be added
twice.

Regarding to RFC4511, section 4.6 such a modification must be atomic:
------------------------------------------------------------------------
     ........ as a single atomic operation.  While individual
     modifications may violate certain aspects of the directory schema
     (such as the object class definition and Directory Information Tree
     (DIT) content rule), the resulting entry after the entire list of
     modifications is performed MUST conform to the requirements of the
     directory model and controlling schema [RFC4512].
------------------------------------------------------------------------

However, I get a very similar error with ApacheDS 1.5.4: "objectClass w/
OID ... has already been registered!". When switching the order it works.

> Can the order of these modifications be switched so the delete is done before the add?

Yes, I think so.

But lets discuss if there could be problems and other corner cases.

I remember one problem: Some servers had problems when deleting the only
value of an must attribute. But this is solved in Studio by using the
"replace" operation: If only one value exists for an attribute then the
"replace" operation is used to modify the value.

If anyone sees problems with such a change, please let us know.

Kind Regards,
Stefan



Mime
View raw message