Object content collisions
An object content collision occurs when:
- For an HCP namespace without versioning enabled, these events occur in the order shown:
- An object is created with the same name in that namespace on both systems involved in a replication link, but the object has different content on the two systems.
- The object on one of the systems is replicated to the other system.
If versioning is enabled for the namespace, no collision occurs. Instead, the less recently created of the two objects becomes an old version of the more recently created object. If the two objects were created at exactly the same time, the object that was created on the system where the link was created is treated as the newer version.
- For a default-namespace folder, these events occur in the order shown:
- An object is created with the same name in that folder on both systems involved in a replication link, but the object has different content on the two systems.
- The object on one of the systems is replicated to the other system.
When an object content collision occurs, the more recently created object keeps its name and location. The other object is either moved to the .lost+found folder in the same namespace or renamed, depending on the namespace configuration. If the two objects were created at exactly the same time, the object that was created on the system where the link was created keeps its name and location.
When HCP moves an object to the .lost+found folder, the full object path becomes .lost+found/replication/link-id/old-object-path.
When renaming an object due to a content collision, HCP changes the object name to object-name.collision or object-name.version-id.collision, where version-id is the version ID of the object. HCP uses the second format only if versioning has ever been enabled for the namespace that contains the object but is not currently enabled.
If the new name is already in use, HCP changes the object name to object-name.1.collision or object-name.version-id.1.collision, as applicable. If that name is already in use, HCP successively increments the middle integer by one until a unique name is formed.
Objects that have been relocated or renamed due to content collisions are flagged as replication collisions in their system metadata. Clients can use the metadata query API to search for objects that are flagged as replication collisions.
If an object that has been flagged as a replication collision changes (for example, if its retention period is extended), its collision flag is removed. If a client creates a copy of a flagged object with a new name, the collision flag is not set on the copy.
Namespaces can be configured to have the DIsposition service automatically delete objects that are flagged as replication collisions. When selecting this option for a namespace, the tenant administrator specifies the number of days the DIsposition service should wait before deleting such an object. The days are counted from the time the collision flag is set. If the collision flag is removed from an object, the object is no longer eligible for deletion by the DIsposition service.