-
Notifications
You must be signed in to change notification settings - Fork 101
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
Enhancement: Implement Chunk Deletion for Multi-part Uploaded Files on GCP and Openstack Cloud Providers #673
Enhancement: Implement Chunk Deletion for Multi-part Uploaded Files on GCP and Openstack Cloud Providers #673
Conversation
…triggered instead of waiting for the chunks to get deleted when the corresponding snapshot is garbage collected
… object is uploaded
Thank you @anveshreddy18 for your contribution. Before I can start building your PR, a member of the organization must set the required label(s) {'reviewed/ok-to-test'}. Once started, you can check the build status in the PR checks section below. |
…ext timeout * Timeout same as chunk upload timeout * Collected individual chunk deletion errors into a errList * Affected code: Gcs & Swift snapstore chunk deletion
Context:: After discussing the need for immediate chunk deletion, it is decided that we don't need to make it complex and also functionality wise, it should be done by GC so letting GC delete the chunks. My recent commit has changes according to that. Please take a look once @seshachalam-yv @ishan16696 |
Thanks @anveshreddy18 for changes, please change the release note accordingly to reflect the functionality. |
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.
/lgtm
…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
…n GCP and Openstack Cloud Providers (#673) (#682) * 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 Co-authored-by: Anvesh Reddy Pinnapureddy <anvesh.reddy.pinnapureddy@sap.com>
What this PR does / why we need it:
After the snapshots are uploaded as multiple parts (Chunks) to cloud storage buckets, chunks are not auto-deleted on a few cloud providers. Out of the providers we use, GCP & OpenStack does not delete the chunks after forming composite object. These chunks take up space equal to its corresponding composite object. With this PR, storage occupancy & cost of the bucket can be reduced to half.
Added functionality in GC to delete chunks
Which issue(s) this PR fixes:
Fixes #268
Special notes for your reviewer:
Release note: