New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add MaxNoncurrentVersions to NoncurrentExpiration action #13580
Conversation
e4f500e
to
46b4df1
Compare
46b4df1
to
a0f8d0f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some comments
a0f8d0f
to
77cbdc4
Compare
cc4a832
to
b74119f
Compare
@klauspost the main idea here was to deliver this fix first and then subsequently take time to merge the format change and optimize this part further. This is also an opt-in where Max value is only set this should tax the Put() with reasonable reasoning. |
d9c5789
to
4941b74
Compare
@klauspost To summarize the changes I have made in this PR since your last comment, I have implemented a scanner callback (as suggested) which removes noncurrent versions keeping only most recent I have retained the less performant codepath invoked by the upload handlers. This is not active by default. It can be enabled via an env var ( Once #13573 is merged, we can improve performance of this codepath, or even remove it. |
7f75864
to
8b91e90
Compare
This comment has been minimized.
This comment has been minimized.
b0c3e0d
to
0cc60d9
Compare
@krisis can you rebase this PR on top of the newer changes? |
51c3fed
to
82a8352
Compare
923bb99
to
77e35e0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One comment everything else LGTM and tested
This unit allows users to limit the maximum number of noncurrent versions of an object. To enable this rule, ``` cat <<EOF | ./mc ilm import myminio/mybucket { "Rules": [ { "ID": "test-max-noncurrent", "Status": "Enabled", "Filter": { "Prefix": "user-uploads/" }, "NoncurrentVersionExpiration": { "MaxNoncurrentVersions": 5 } } ] } EOF
77e35e0
to
b1418e9
Compare
b1418e9
to
d1d4588
Compare
Mint Automation
|
This unit allows users to limit the maximum number of noncurrent versions of an object. To enable this rule you need the following *ilm.json* ``` cat >> ilm.json <<EOF { "Rules": [ { "ID": "test-max-noncurrent", "Status": "Enabled", "Filter": { "Prefix": "user-uploads/" }, "NoncurrentVersionExpiration": { "MaxNoncurrentVersions": 5 } } ] } EOF mc ilm import myminio/mybucket < ilm.json ```
This unit allows users to limit the maximum number of noncurrent versions of an object. To enable this rule you need the following *ilm.json* ``` cat >> ilm.json <<EOF { "Rules": [ { "ID": "test-max-noncurrent", "Status": "Enabled", "Filter": { "Prefix": "user-uploads/" }, "NoncurrentVersionExpiration": { "MaxNoncurrentVersions": 5 } } ] } EOF mc ilm import myminio/mybucket < ilm.json ```
This unit allows users to limit the maximum number of noncurrent versions of an object. To enable this rule you need the following *ilm.json* ``` cat >> ilm.json <<EOF { "Rules": [ { "ID": "test-max-noncurrent", "Status": "Enabled", "Filter": { "Prefix": "user-uploads/" }, "NoncurrentVersionExpiration": { "MaxNoncurrentVersions": 5 } } ] } EOF mc ilm import myminio/mybucket < ilm.json ```
Description
This unit allows users to limit the maximum number of noncurrent versions of an
object.
Motivation and Context
To limit number of noncurrent versions of an object.
How to test this PR?
bash -x <above-script.sh> myminio
Now, perform
mc cp
to upload a new version and trigger the removal of excess noncurrent versions as configured.This requires mc compiled with minio/minio-go#1580
Types of changes
Checklist:
commit-id
orPR #
here)