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 <el...@apache.org> on 2009/05/31 13:57:33 UTC

Issue with entryCSN attribute and schema...

Hi guys,

as I'm trying to inject some operationalAttributes in every entries, I 
face an interesting problem. Obviously, the schema elements must also 
have an entryUUID and entryCSN attributes. For entryUUID, there is no 
problem, so far, but for entryCSN, that's not the same story... As this 
AT is built based on the local instance (the SID is part of the CSN), we 
can't anymore use the pre-built schema partition, as it's totally 
instance agnostic.

We have options though :
- defining a special sid for such entries, 0xFFF for instance. It's very 
unlikely that we will see any day such a number used for CSN.
- get rid of this pre-built partition. We load the schema dynamically on 
server startup, and inject CSN at startup
- modify the entryCSN for those entries at startup, to inject the 
current SID

At least, these are the options I'm considering right now. I don't think 
we have time to implement (2) atm, so my guts tell me that option (1) is 
probably the best for the moment.

thoughts ?

 -- 
--
cordialement, regards,
Emmanuel Lécharny
www.iktek.com
directory.apache.org



Re: Issue with entryCSN attribute and schema...

Posted by Emmanuel Lecharny <el...@apache.org>.
Kiran Ayyagari wrote:
>
>
> Emmanuel Lecharny wrote:
>> We have options though :
>> - defining a special sid for such entries, 0xFFF for instance. It's 
>> very unlikely that we will see any day such a number used for CSN.
> As the CSN is mostly used for replication only, for 1.5.5 I would say 
> +1 for this

Or 0, as suggested by Howard.
>
>> - get rid of this pre-built partition. We load the schema dynamically 
>> on server startup, and inject CSN at startup
> +1, I think this will ease the schema injection and eliminates the 
> need for creating
> a custom schema partition, which was a recurring question on user's ML
> A question here, how do we detect the schema changes?
We already have a mecanism to handle changes. When loading a schema, we 
create an entry in the DIT containing some information about the loaded 
schema, like the schema creation date. When the server restart, we can 
control that the file hasn't changed. We can also compute a schema 
signature to get the same result.

>> - modify the entryCSN for those entries at startup, to inject the 
>> current SID
> IMHO this effort will be a waste when we implement (2).
Yep. And too slow.

Thanks Kiran !

-- 
--
cordialement, regards,
Emmanuel Lécharny
www.iktek.com
directory.apache.org



Re: Issue with entryCSN attribute and schema...

Posted by Kiran Ayyagari <ay...@gmail.com>.

Emmanuel Lecharny wrote:
> We have options though :
> - defining a special sid for such entries, 0xFFF for instance. It's very 
> unlikely that we will see any day such a number used for CSN.
As the CSN is mostly used for replication only, for 1.5.5 I would say +1 for this

> - get rid of this pre-built partition. We load the schema dynamically on 
> server startup, and inject CSN at startup
+1, I think this will ease the schema injection and eliminates the need for creating
a custom schema partition, which was a recurring question on user's ML
A question here, how do we detect the schema changes?
I think that a full scan of cn=schema partition is necessary at every time server stars.

> - modify the entryCSN for those entries at startup, to inject the 
> current SID
IMHO this effort will be a waste when we implement (2).
> 
> At least, these are the options I'm considering right now. I don't think 
> we have time to implement (2) atm, so my guts tell me that option (1) is 
> probably the best for the moment.

ah, yes, I agree

Kiran Ayyagari

Re: Issue with entryCSN attribute and schema...

Posted by Emmanuel Lecharny <el...@apache.org>.
Howard Chu wrote:
> Emmanuel Lecharny wrote:
>> Hi guys,
>>
>> as I'm trying to inject some operationalAttributes in every entries, I
>> face an interesting problem. Obviously, the schema elements must also
>> have an entryUUID and entryCSN attributes. For entryUUID, there is no
>> problem, so far, but for entryCSN, that's not the same story... As this
>> AT is built based on the local instance (the SID is part of the CSN), we
>> can't anymore use the pre-built schema partition, as it's totally
>> instance agnostic.
>>
>> We have options though :
>> - defining a special sid for such entries, 0xFFF for instance. It's very
>> unlikely that we will see any day such a number used for CSN.
>> - get rid of this pre-built partition. We load the schema dynamically on
>> server startup, and inject CSN at startup
>> - modify the entryCSN for those entries at startup, to inject the
>> current SID
>
> Currently OpenLDAP treats SID 0 as unused/single-master. I don't think 
> there's any issue in initializing these entries with SID 0, as long as 
> the real SID is used when any modifications are made.
Probably an option. I didn't like the idea to use 0 for the unused SID? 
but maybe I'm biased, thinking that everything on earth is like an 
array, starting at 0 !!!

Thanks Howard !

-- 
--
cordialement, regards,
Emmanuel Lécharny
www.iktek.com
directory.apache.org



Re: Issue with entryCSN attribute and schema...

Posted by Howard Chu <hy...@symas.com>.
Emmanuel Lecharny wrote:
> Hi guys,
>
> as I'm trying to inject some operationalAttributes in every entries, I
> face an interesting problem. Obviously, the schema elements must also
> have an entryUUID and entryCSN attributes. For entryUUID, there is no
> problem, so far, but for entryCSN, that's not the same story... As this
> AT is built based on the local instance (the SID is part of the CSN), we
> can't anymore use the pre-built schema partition, as it's totally
> instance agnostic.
>
> We have options though :
> - defining a special sid for such entries, 0xFFF for instance. It's very
> unlikely that we will see any day such a number used for CSN.
> - get rid of this pre-built partition. We load the schema dynamically on
> server startup, and inject CSN at startup
> - modify the entryCSN for those entries at startup, to inject the
> current SID

Currently OpenLDAP treats SID 0 as unused/single-master. I don't think there's 
any issue in initializing these entries with SID 0, as long as the real SID is 
used when any modifications are made.
>
> At least, these are the options I'm considering right now. I don't think
> we have time to implement (2) atm, so my guts tell me that option (1) is
> probably the best for the moment.
>
> thoughts ?
>
>   --
> --
> cordialement, regards,
> Emmanuel Lécharny
> www.iktek.com
> directory.apache.org
>
>
>


-- 
   -- Howard Chu
   CTO, Symas Corp.           http://www.symas.com
   Director, Highland Sun     http://highlandsun.com/hyc/
   Chief Architect, OpenLDAP  http://www.openldap.org/project/