Working with Versioning

When Versioning is Enabled

When you enable or suspend versioning, the existing objects in your domain or bucket do not change: what changes is how Swarm handles future requests. 

Once versioning is enabled in a context, Swarm uses each object's metadata to walk a virtual chain of versions of an object, from creation to deletion:

The order of the versions is the creation order, with the most recent one always being the current version.

These virtual version chains are extremely resilient: Swarm linearizes the linkage so the newest version of an object links to the next in the ordering, which links to the next, and Swarm's health processing guarantees temporarily broken chains are repaired. Swarm orders all versions by the time they are written, regardless of the operations that created them.

Note

Only the sequence of the version chain is maintained: Swarm does not document change events, such as which operation caused the new version or that one is a restored version of another. 

All usual SCSP operations act on the current version, which is the most recently updated one, unless a previous version is mentioned on the request.

Key Principles: These principles apply across all versioning operations, whether versioning is enabled or suspended:

Tip

If you get an HTTP 404 Not Found or HTTP 400 Bad Request error when using the version query argument, this indicates that the context is versioning-disabled, which is the default if the versioning policy is still unspecified.

See https://perifery.atlassian.net/wiki/spaces/public/pages/2443812462 and https://perifery.atlassian.net/wiki/spaces/public/pages/2443812514.

When Versioning is Suspended

Suspending versioning allows new versions of the same object to stop accruing without jeopardizing the set of versions that already exists.

Tip

If you decide to undo version control altogether, you can disable versioning in the domain or bucket, which triggers the Health Processor to clean up all residual prior versions. This feature is not available in Amazon S3.

When you suspend versioning, existing objects in your domain or bucket do not change: what changes is how Swarm handles future requests. You can re-enable versioning to have Swarm resume versioning behavior where it left off.

  • New Objects: No versions are created for any objects created after versioning is suspended.

  • Updating Objects: Swarm retains all existing versions when the versioning state is changed to suspended. After that, any update creates a new current version, which is overwritten with updates after that. 

  • Retrieving Objects: Regardless of the versioning state of the domain or bucket, GET Object requests return the current version of an object.

  • Deleting Objects: If versioning is suspended, a DELETE request creates a delete marker for the object. You can also delete a specified version, which permanently removes that object. 

© DataCore Software Corporation. · https://www.datacore.com · All rights reserved.