Delete noncurrent versions and expired delete markers in StorageGRID
When you suspend versioning on a bucket, you need to configure the bucket lifecycle to handle noncurrent versions and expired null-versioned delete markers.
- Example of a bucket lifecycle configuration that handles noncurrent versions and expired delete markers
-
These steps are performed on a bucket with an active ILM policy:
-
Enable versioning. When objects with the same name are ingested, previous versions remain available as noncurrent versions and the delete requests create delete markers. Noncurrent versions are accessible, but they use storage space.
-
Suspend versioning because the desired configuration is to retain only one version and free up storage space used by noncurrent versions. This is configured in the next step.
-
Configure a bucket lifecycle to handle the noncurrent versions and delete markers that remain after versioning is suspended.
-
- ILM policy
-
Rule based on ingest-time reference (default): On Day 0, keep X copies forever
- Bucket Lifecycle
-
"Filter": {}, "Expiration": {"ExpiredObjectDeleteMarker": true}, "NoncurrentVersionExpiration": {"NoncurrentDays": 1} - Result
-
The bucket lifecycle is configured to handle noncurrent versions and expired delete markers:
-
Versions that have been noncurrent for more than one day are deleted. Only the current version remains forever.
-
An object named
draftdocis ingested and has the version IDNULL. -
If another object is ingested with the same name (
draftdoc), it overwrites and replaces the null version and immediately deletes the previous version. -
If a delete request is made to
draftdocwithout specifying a version ID, it creates a null-versioned delete marker, replacing and deleting the null-versioned object. -
The null-versioned delete marker is expired because there are no noncurrent versions.
-
Shortly after, the expired null-versioned delete marker is deleted.
-