Skip to content
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

LIFECYCLE - fix issue with delete only 3K objects a day #8074

Merged
merged 1 commit into from
May 29, 2024

Conversation

jackyalbo
Copy link
Contributor

Explain the changes

  1. delete_multiple_objects_by_filter will return the number of objects deleted
  2. lifecycle will run every 5 minutes if any of its rules has deleted the max objects it can (1K - meaning he can delete more and we shouldn't wait to the next cycle)

Issues: Fixed #xxx / Gap #xxx

  1. Fixed https://bugzilla.redhat.com/show_bug.cgi?id=2279964

Testing Instructions:

  1. create more than 3K of objects on a bucket (let's say 3.5K)
  2. set this lifecycle rule:
{
    "Rules": [{
          "Expiration": {
                "Days": 1
            },
            "ID": "data-expire-withoutprefix",
            "Filter": {
                "Prefix": ""
            },
            "Status": "Enabled"
        }
    ]
}
  1. wait till LIFECYCLE runs a day after - see that it deleted all the objects and not just 1K object every 8 hours.
  • Doc added/updated
  • Tests added

Copy link
Contributor

@liranmauda liranmauda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just some small comments.

src/api/object_api.js Outdated Show resolved Hide resolved
src/server/bg_services/lifecycle.js Outdated Show resolved Hide resolved
src/server/object_services/object_server.js Outdated Show resolved Hide resolved
delete_multiple_objects_by_filter will return the number of objects deleted
lifecycle will run every 5 minutes if any of its rules has deleted the max objects it can (1K - meaning he can delete more and we shouldn't wait to the next cycle)

Signed-off-by: jackyalbo <jacky.albo@gmail.com>
@jackyalbo jackyalbo merged commit 9fdaa9c into noobaa:master May 29, 2024
10 checks passed
@guymguym guymguym added this to the 5.16.z milestone May 29, 2024
jackyalbo added a commit to jackyalbo/noobaa-core that referenced this pull request Jun 9, 2024
fixing part change from objects_deletes to num_objects_deleted

Signed-off-by: jackyalbo <jacky.albo@gmail.com>
jackyalbo added a commit to jackyalbo/noobaa-core that referenced this pull request Jun 9, 2024
fixing part change from objects_deletes to num_objects_deleted

Signed-off-by: jackyalbo <jacky.albo@gmail.com>
jackyalbo added a commit that referenced this pull request Jun 9, 2024
jackyalbo added a commit to jackyalbo/noobaa-core that referenced this pull request Jun 13, 2024
fixing part change from objects_deletes to num_objects_deleted

Signed-off-by: jackyalbo <jacky.albo@gmail.com>
(cherry picked from commit 7854feb)
liranmauda pushed a commit to liranmauda/noobaa-core that referenced this pull request Jul 30, 2024
fixing part change from objects_deletes to num_objects_deleted

Signed-off-by: jackyalbo <jacky.albo@gmail.com>
(cherry picked from commit 7854feb)
liranmauda pushed a commit to liranmauda/noobaa-core that referenced this pull request Jul 30, 2024
fixing part change from objects_deletes to num_objects_deleted

Signed-off-by: jackyalbo <jacky.albo@gmail.com>
(cherry picked from commit 7854feb)
dannyzaken pushed a commit to dannyzaken/noobaa-core that referenced this pull request Sep 29, 2024
fixing part change from objects_deletes to num_objects_deleted

Signed-off-by: jackyalbo <jacky.albo@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants