Schema changes, inheritance, and the graph server
The graph server provides an in-memory model of entity data, as well as fast ancestor traversal and content retrieval. It contains:
-
An Elasticsearch graph worker, which creates denormalized search service documents that activate after any change to the entity data model.
-
A business audit graph worker, which creates audit entries from any event in the system, including those not affecting the entity data model.
The following explains the different schema changes types in Sitecore Content Hub, the inheritance model, and the impact of changes on the graph server.
Changing entity definitions also changes the structure of the data. Be careful when changing existing entity definitions. You can only delete an entity definition when there are no relations or taxonomies linked to the definition itself. All entities created under the entity definition you are deleting are lost.
Schema change types
Change type |
Description |
Includes |
---|---|---|
Content |
Changes to entity definitions that can be directly represented by the entity model, such as alteration of relation flags, inheritance, new or removed members, and so on. |
Changes that: Affect descendants. This applies to most changes, because of numerous relations between entities. Do not affect descendants. For example, the addition of a property that is not included in full-text content, or the addition of a relation that does not provide any inheritance. |
Validation |
Changes to the rules that are enforced on the entity definition. |
Changes to: Entity definition member mandatory flags. Mandatory member conditions. Mandatory validation cultures. Regular expressions or validation expressions of the property definition. Mandatory rules and conditions of a parent or a child. |
Representation |
Changes to rules representing the entity model using external APIs, for example, the REST API. These rules are not essential to the existing entity model. |
Changes to the list of nested properties and to the following flags: allow updates allow navigation is nested nested permissions is rendition relation |
Entity |
Changes to entity items. |
Changes to the: Value of system properties, for example, the modified on or is locked flag. Value of properties. Linked entities via the relations in the form of a difference set. Entity relation properties, for example, the inherit security flag. |
Inheritance and dependency
The Content Hub data model can be represented as a directed graph, which allows multiple forms of inheritance:
-
Taxonomy inheritance - the entity has a taxonomy hierarchy attached to it and can be searched for using this taxonomy as a facet.
-
Path inheritance - the full path is available on path-enabled entities.
-
Topology inheritance - the entity inherits directly from its parents.
-
Content inheritance - the entity inherits the full-text content of its ancestors.
-
Completion inheritance - the entity inherits all content from the parent and ancestor entities.
-
Security inheritance - the entity inherits security settings from its ancestors, determining access to that entity.
For performance reasons, we recommend that you turn off the Inherits security switch when there are more than two levels of inheritance. You can find this switch in the Technical group on the entity detail page.
This model creates various change configurations, including:
-
Entity content changed - a change requiring an update of the entity and any descendants that inherit from the entity.
-
Entity locked - a change requiring an update of the relations for the entity.
-
Entity removed from the system - a change requiring an update to descendants connected through relations and inheritance.
Any change to the entity or the relation information, which is visible to the entity or to a descendant of the entity by inheritance, needs to be propagated so that none of the related entities in the system contain outdated information.
The concept of inheritance creates a natural order in the entities – for example, ancestors, parents, children, descendants – and in the entity definitions. For example, there is a flow of data from asset definition entities to file definition entities, but not the other way around.
This concept represents dependencies of several objects towards one another. Entities and entity definitions with few dependencies are called high-hierarchy, whereas those with many dependencies are called low-hierarchy.
Graph server behavior
Any change in the system triggers the following series of events in the graph server:
-
If the event describes a change to the entity data model, the graph model is updated.
-
If the graph model is updated, any graph worker listening for graph changes is instructed to apply all the effects of the event. For example, the ElasticSearch graph worker exports all affected entity–bound search service documents.
-
If the event did not change the entity data model, and the graph model was not updated, any graph worker listening for non-modifying events are instructed to perform corresponding actions. For example, the business audit graph worker creates an audit entry while using existing graph data to compose rich context information.
The following events do not modify the graph model:
-
Validation changes to an entity definition.
-
Representation changes to an entity definition.
-
Events not related to direct changes or deletion of entities, entity definitions, and datasources.
The following events reload the graph model:
Changes to |
Reload |
---|---|
Content entity definitions that also affect descendants |
All entities in the corresponding entity definition, and all entities in dependent entity definitions. |
Content entity definitions that do not affect descendants |
All entities in the corresponding entity definition, and all entities in child entity definitions. |
Entities |
The corresponding entity, and any descendant entities that inherit information from the affected entity, according to the logic explained in this topic. |
Be aware of the potentially significant workload placed on the graph server as a result of your changes. If you intend to make substantial changes, particularly those involving high-hierarchy entities and entity definitions, either plan a suitable period of downtime or make your changes outside of standard work hours.