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

fix(CSI-224,WEKAPP-417375): race condition on multiple volume deletion in parallel #286

Merged
merged 4 commits into from
Jul 31, 2024

Conversation

sergeyberezansky
Copy link
Collaborator

@sergeyberezansky sergeyberezansky commented Jul 23, 2024

TL;DR

Refactored garbage collection initiation and handling in the WekaFS package for better traceability, logging, and performance.

What changed?

  • Introduced OpenTelemetry tracing to GC functions.
  • Improved logging for GC initiation and directory deletion processes.
  • Replaced synchronous volume purge with move to trash followed by async GC initiation.
  • Enhanced directory deletion using worker pool mechanism to limit concurrent deletions.
  • Updated variable names and function names for better clarity.

How to test?

  • Run unit tests available for the wekafs package.
  • Perform integration testing by deploying in staging environment and monitor logs and traces for GC operations.
  • Create dozens of PVCs and load them with thousands of files. Delete all PVCs at once, follow up on garbage collection process

Why make this change?

  • Improved traceability and debugging with OpenTelemetry spans and enriched logging.
  • Increased performance during directory deletions using a worker pool mechanism.
  • Cleaned up code for better readability and maintainability.

Copy link
Collaborator Author

sergeyberezansky commented Jul 23, 2024

Copy link

graphite-app bot commented Jul 23, 2024

Graphite Automations

"Request reviewers once CI passes" took an action on this PR • (07/23/24)

1 reviewer was added to this PR based on Sergey Berezansky's automation.

@sergeyberezansky sergeyberezansky force-pushed the 07-03-chore_deps_update_dependencies_to_latest_version branch from 30c6c34 to 51a8cf7 Compare July 28, 2024 09:53
@sergeyberezansky sergeyberezansky force-pushed the sergey/fix-race-on-multi-delete branch from ac5a71b to a51ebe3 Compare July 28, 2024 09:53
@sergeyberezansky sergeyberezansky force-pushed the sergey/fix-race-on-multi-delete branch from a51ebe3 to 45c15bb Compare July 28, 2024 15:58
@sergeyberezansky sergeyberezansky changed the base branch from 07-03-chore_deps_update_dependencies_to_latest_version to sergey/allow-host-network July 28, 2024 15:58
@sergeyberezansky sergeyberezansky force-pushed the sergey/allow-host-network branch from a99ca64 to a54f898 Compare July 28, 2024 16:05
@sergeyberezansky sergeyberezansky force-pushed the sergey/fix-race-on-multi-delete branch 3 times, most recently from 8baaabf to 4874d5b Compare July 28, 2024 16:36
@sergeyberezansky sergeyberezansky changed the base branch from sergey/allow-host-network to sergey/slack-link-code-format July 28, 2024 16:36
@sergeyberezansky sergeyberezansky force-pushed the sergey/slack-link-code-format branch from b2a746a to e62492c Compare July 29, 2024 06:06
@sergeyberezansky sergeyberezansky force-pushed the sergey/fix-race-on-multi-delete branch 2 times, most recently from e42fe5b to dad0152 Compare July 29, 2024 06:10
@sergeyberezansky sergeyberezansky changed the base branch from sergey/slack-link-code-format to dev July 29, 2024 06:11
@sergeyberezansky sergeyberezansky changed the title fix(CSI-224): race condition on multiple volume deletion in parallel fix(CSI-224,WEKAPP-417375): race condition on multiple volume deletion in parallel Jul 29, 2024
@sergeyberezansky sergeyberezansky force-pushed the sergey/fix-race-on-multi-delete branch 6 times, most recently from 4124fc4 to f70ba39 Compare July 29, 2024 13:04
@sergeyberezansky sergeyberezansky force-pushed the sergey/fix-race-on-multi-delete branch 2 times, most recently from 93fda96 to 5d72c28 Compare July 30, 2024 12:20
@sergeyberezansky sergeyberezansky changed the base branch from dev to sergey/fix-wekafs-mount-leak July 30, 2024 12:20
@sergeyberezansky sergeyberezansky force-pushed the sergey/fix-race-on-multi-delete branch 15 times, most recently from 1093ef5 to 64afcb5 Compare July 31, 2024 10:09
@sergeyberezansky sergeyberezansky changed the base branch from sergey/fix-wekafs-mount-leak to dev July 31, 2024 10:10
@sergeyberezansky sergeyberezansky force-pushed the sergey/fix-race-on-multi-delete branch from 64afcb5 to 9763acf Compare July 31, 2024 10:17
Copy link
Collaborator Author

sergeyberezansky commented Jul 31, 2024

Merge activity

@sergeyberezansky sergeyberezansky merged commit 6f78a1a into dev Jul 31, 2024
3 of 4 checks passed
@sergeyberezansky sergeyberezansky deleted the sergey/fix-race-on-multi-delete branch July 31, 2024 11:53
@sergeyberezansky sergeyberezansky added bug Something isn't working fix and removed bug Something isn't working labels Jul 31, 2024
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.

1 participant