the approach of 'no-swapping' sounds good to me
thanks for all the great work I now understand what a pain this schema
refactoring is
Kiran Ayyagari
Emmanuel Lecharny wrote:
Hi,
when we modify the schema, for instance by adding a new AT, in order not
to break the current schema, we apply the modification to a cloned
Registries. So far, so good. And if the new registries is ok with the
newly added SchemaObject, we swap the registries.
Now, this create a dull issue : all the ServerEntry instances still
point to the previous registries, and as we clean the previous
registries to avoid memory leaks, all those instances now point to non
existing SchemaObjects (more specifically, each instance has attributes
which contain a reference to the AttributeType schemaObject they are
associated with) !
Question : how can we avoid this problem ? My idea is to apply the
modification to the initial registries once it has been proven that the
registries alteration leave the Regsitries consistent. We will just
clean the cloned registries, and don't swap anymore.
Does it sound good to you, or do you have any better idea ?