On Sat, Sep 26, 2009 at 3:23 PM, Emmanuel Lecharny <email@example.com> wrote:
just a question on schema, and theirs state.
When we inject a schema in the server, we store it on disk in a Ldif partition. All the schema objects are then written to disk (id we inject a OpenLDAP format schema or the ldif counterpart). At this time, it's disabled by default, and each schema element has an attributeType m-disabled set to TRUE. The registries does not contain any of the loaded elements, except if the m-disabled AT is set to FALSE (and even then it all depends on if the schema is enabled or not)
In order to be able to use this schema, we have to switch this AT to FALSE (ie, now, it's enabled). That will be reflected on disk as the schemaObject ldif entry will be rewritten. It also has an impact on the registries, as they will now contain the schema's elements.
So the basic rules, AFAIK, are :
- a schema is disabled when loaded, unless it's explicitely enabled
- if a schema is disabled, then all the contained schemaObject are disabled, even if they are marked as enabled
- when we enable a schema, all the contained element not explicitely marked as disabled are loaded into the registries
- when we disabled a schema, all the associated schemaObjects are removed from the registries
- we can't disabled a schemaObject if another enabled schema object depends on it (like if the disabled element is an AT and is the superior of another AT)
- whatever we do on the schema does not impact the data, in any way.