Custom metadata collisions
A custom metadata collision occurs when these events occur in the order shown:
- One of these changes occurs:
- An annotation is added with the same name to a given object on each of two systems in a replication topology, but the annotation has different content on the two systems.
The addition of an annotation to a given object on only one of the systems does not result in a custom metadata collision if the object does not have an annotation with the same name on the other system. In this case, the new annotation is replicated without conflict.
- Different changes are made to the content of a given annotation for a given object on each of the two systems in a replication link.
- A change is made to the content of a given annotation for a given object on one system in a replication link, and the same annotation is deleted on another system in the link.
- An annotation is added with the same name to a given object on each of two systems in a replication topology, but the annotation has different content on the two systems.
- The change made on one of the systems is replicated to the other system.
For a default-namespace directory, these events occur in the order shown:
- One of these changes occurs:
- Custom metadata is added to a given object on both systems involved in a replication link, but the added custom metadata is different on the two systems.
The addition of custom metadata to an object on only one of the systems involved in a replication link does not result in a custom metadata collision. Instead, the new custom metadata is replicated from that system to the other system involved in the link without conflict.
- The custom metadata for a given object is replaced on both systems involved in a replication link, but the replacement custom metadata is different on the two systems.
- The custom metadata for a given object is replaced on one of the systems involved in a replication link, and the same custom metadata is deleted on the other system involved in the link.
- Custom metadata is added to a given object on both systems involved in a replication link, but the added custom metadata is different on the two systems.
- The change made on one of the systems is replicated to the other system.
If a collision occurs when a custom metadata change for a given object is replicated from one system (system A) in a replication link to another system (system B) in the link:
- If the last change on system A is more recent than the last change on system B, HCP applies the change from system A to the custom metadata on system B
- If the last change on system B is more recent than the last change on system A, HCP does not change the custom metadata on system B
Here are some examples of how HCP handles collisions when custom metadata changes for a given object are replicated from one system (system A) in a replication link to another system (system B) in the link.
Example 1
In an HCP namespace, the object starts out with annotations named a1 and a2 on both system A and system B.
The following list shows a sequence of events in which the annotations for the object are changed and the changes are then replicated.
- On system B, a client changes the content of a1.
- On system A, a client makes a different change to the content of a1.
- On system A, a client adds annotation a3 to the object.
- On system B, a client adds annotation a3 with different content from the a3 added on system A.
- The changes on system A are replicated to system B. The resulting annotations for the object on system B are:
- a1 with the changed content from system A
- a2 (unchanged)
- a3 with the content added on system B
- The changes on system B are replicated to system A. The resulting annotations for the object on system A are:
- a1 with the changed content from system A
- a2 (unchanged)
- a3 with the content added on system B
Example 2
The object starts out with the annotations named a1, a2, and a3 on both system A and system B.
The following list shows a sequence of events in which the annotations for the object are changed and the changes are then replicated.
- On system B, a client changes the content of a1.
- On system A, a client deletes a1.
- On system A, a client changes the content of a2.
- On system B, a client changes the content of a2.
- On system A, a client deletes a3.
- On system B, a client changes the content of a3.
- The changes on system A are replicated to system B. The resulting annotations for the object on system B are:
- a2 with the changed content from system B
- a3 with the changed content from system B
- The changes on system B are replicated to system A, the resulting annotations for the object on system A are:
- a2 with the changed content from system B
- a3 with the changed content from system B
Example 3
In a default-namespace directory, the object starts out with same custom metadata on system A and system B.
The following list shows a sequence of events in which the custom metadata for the object is changed and the change is then replicated.
- On system B, a client replaces the custom metadata for the object with new custom metadata.
- On system A, a client replaces the custom metadata for the object with different custom metadata from the custom metadata used on system B.
- The change on system A is replicated to system B. The resulting custom metadata for the object on system B is the new custom metadata from system A.