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

[rel-v0.24] Enhancement: Implement Chunk Deletion for Multi-part Uploaded Files on GCP and Openstack Cloud Providers #682

Merged
merged 1 commit into from
Nov 22, 2023

Conversation

ishan16696
Copy link
Member

What this PR does / why we need it:
Cherrypick of PR: #673

Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:

Release note:

Enhanced Garbage Collector to garbage collect the chunks for cloud providers like GCP and OpenStack which does not automatically delete snapshot chunks after the formation of a composite object.

…n GCP and Openstack Cloud Providers (gardener#673)

* Added generic functionality to garbage collect the chunks when GC is triggered instead of waiting for the chunks to get deleted when the corresponding snapshot is garbage collected

* Deleting chunks from GCS bucket immediately after the composite object is uploaded

* Deleting chunks from OpenStack bucket immediately after the composite object is uploaded

* Add logs for count of chunks getting deleted

* Updated comments and code for readability

* Fixed a bug in tests

* Transfer the immediate chunk deletion logic to new function with context timeout

* Timeout same as chunk upload timeout
* Collected individual chunk deletion errors into a errList
* Affected code: Gcs & Swift snapstore chunk deletion

* Add logs after successfully performing chunk deletion

* Fix snapstore tests, update comments

* Parallelize chunk deletion
* For better performance
* To prevent blocking the snapshotter while chunk deletion for older snapshot is underway

* Add comment

* Add mutex to prevent DATA RACE in ObjectMap of mock GCS & Swift clients while deleting chunks in parallel

* Minor fixes

* Add mutex to prevent parallel read & write for GCS Mock client

* Improved error collection in chunk deletion

* Remove immediate chunk deletion, address edge case in Garbage Collection

* Address review comments

* Minor fixes
@ishan16696 ishan16696 requested a review from a team as a code owner November 22, 2023 16:18
@gardener-robot gardener-robot added needs/review Needs review size/s Size of pull request is small (see gardener-robot robot/bots/size.py) labels Nov 22, 2023
@gardener-robot-ci-3 gardener-robot-ci-3 added reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) needs/ok-to-test Needs approval for testing (check PR in detail before setting this label because PR is run on CI/CD) and removed reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) labels Nov 22, 2023
@ishan16696 ishan16696 merged commit 7b7aa70 into gardener:rel-v0.24 Nov 22, 2023
9 checks passed
@gardener-robot gardener-robot added the status/closed Issue is closed (either delivered or triaged) label Nov 22, 2023
@ishan16696 ishan16696 deleted the cherryPick-PR673 branch November 22, 2023 17:53
@ishan16696 ishan16696 added this to the v0.27.0 milestone Nov 22, 2023
@shreyas-s-rao shreyas-s-rao changed the title [Cherrypick #673] Enhancement: Implement Chunk Deletion for Multi-part Uploaded Files on GCP and Openstack Cloud Providers [rel-v0.24] Enhancement: Implement Chunk Deletion for Multi-part Uploaded Files on GCP and Openstack Cloud Providers Nov 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs/ok-to-test Needs approval for testing (check PR in detail before setting this label because PR is run on CI/CD) needs/review Needs review size/s Size of pull request is small (see gardener-robot robot/bots/size.py) status/closed Issue is closed (either delivered or triaged)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants