mirror of
https://github.com/minio/minio.git
synced 2024-12-26 23:25:54 -05:00
7926401cbd
i.e., this rule element doesn't apply to DEL markers. This is a breaking change to how ExpiredObejctDeleteAllVersions functions today. This is necessary to avoid the following highly probable footgun scenario in the future. Scenario: The user uses tags-based filtering to select an object's time to live(TTL). The application sometimes deletes objects, too, making its latest version a DEL marker. The previous implementation skipped tag-based filters if the newest version was DEL marker, voiding the tag-based TTL. The user is surprised to find objects that have expired sooner than expected. * Add DelMarkerExpiration action This ILM action removes all versions of an object if its the latest version is a DEL marker. ```xml <DelMarkerObjectExpiration> <Days> 10 </Days> </DelMarkerObjectExpiration> ``` 1. Applies only to objects whose, • The latest version is a DEL marker. • satisfies the number of days criteria 2. Deletes all versions of this object 3. Associated rule can't have tag-based filtering Includes, - New bucket event type for deletion due to DelMarkerExpiration
33 lines
1.1 KiB
Go
33 lines
1.1 KiB
Go
// Code generated by "stringer -type Action lifecycle.go"; DO NOT EDIT.
|
|
|
|
package lifecycle
|
|
|
|
import "strconv"
|
|
|
|
func _() {
|
|
// An "invalid array index" compiler error signifies that the constant values have changed.
|
|
// Re-run the stringer command to generate them again.
|
|
var x [1]struct{}
|
|
_ = x[NoneAction-0]
|
|
_ = x[DeleteAction-1]
|
|
_ = x[DeleteVersionAction-2]
|
|
_ = x[TransitionAction-3]
|
|
_ = x[TransitionVersionAction-4]
|
|
_ = x[DeleteRestoredAction-5]
|
|
_ = x[DeleteRestoredVersionAction-6]
|
|
_ = x[DeleteAllVersionsAction-7]
|
|
_ = x[DelMarkerDeleteAllVersionsAction-8]
|
|
_ = x[ActionCount-9]
|
|
}
|
|
|
|
const _Action_name = "NoneActionDeleteActionDeleteVersionActionTransitionActionTransitionVersionActionDeleteRestoredActionDeleteRestoredVersionActionDeleteAllVersionsActionDelMarkerDeleteAllVersionsActionActionCount"
|
|
|
|
var _Action_index = [...]uint8{0, 10, 22, 41, 57, 80, 100, 127, 150, 182, 193}
|
|
|
|
func (i Action) String() string {
|
|
if i < 0 || i >= Action(len(_Action_index)-1) {
|
|
return "Action(" + strconv.FormatInt(int64(i), 10) + ")"
|
|
}
|
|
return _Action_name[_Action_index[i]:_Action_index[i+1]]
|
|
}
|