The prefix overlap feature allows you to create lifecycle rules with overlapping prefixes. This topic covers how to configure the feature and its enforcement logic.
Background information
With prefix overlap disabled, you cannot create two or more lifecycle rules that transition objects with overlapping prefixes to the same storage type, or delete objects with overlapping prefixes. With prefix overlap enabled, you can create lifecycle rules with overlapping prefixes under any conditions.
Rule priority
After you enable prefix overlap,
- If an object matches multiple lifecycle rules, the rule with the shorter expiration period takes priority.
- If the expiration periods are equal, the rule with the lower cost is applied.
TOS executes the lifecycle rules in the following order:
Delete Object > Transition to Deep Cold Archive > Transition to Cold Archive > Transition to Archive > Transition to Flashback Archive > Transition to Infrequent Access Storage > Add Deletion Mark to Object
For example:
- If one rule is configured to transition all objects in the bucket to Infrequent Access Storage 180 days after upload;
- If another rule is configured to transition objects with the prefix test/ to Infrequent Access Storage 90 days after upload;
- Then, objects with the prefix test/ will transition to Infrequent Access Storage after 90 days. All other objects in the bucket will transition to Infrequent Access Storage after 180 days.
Enabling prefix overlap
Before enabling prefix overlap, make sure that at least one lifecycle rule is in place. Otherwise, prefix overlap cannot be enabled.
- In the left navigation pane, click Buckets.
- In the top menu bar, select the project of the bucket you want to manage.
- On the Buckets page, click the bucket you want to manage.
- In the left navigation pane, select Basic configurations > Lifecycle.
- On the Lifecycle page, switch on Prefix overlap in the upper-left corner.
Disabling prefix overlap
Before disabling prefix overlap, delete all lifecycle rules with overlapping prefixes. Otherwise, prefix overlap cannot be disabled.
- In the left navigation pane, click Buckets.
- In the top menu bar, select the project of the bucket you want to manage.
- On the Buckets page, click the bucket you want to manage.
- In the left navigation pane, select Basic configurations > Lifecycle.
- On the Lifecycle page, switch off Prefix overlap in the upper-left corner.