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

Remove FileBlob locking entirely #66297

Merged
merged 1 commit into from Mar 5, 2024
Merged

Remove FileBlob locking entirely #66297

merged 1 commit into from Mar 5, 2024

Conversation

Swatinem
Copy link
Member

@Swatinem Swatinem commented Mar 5, 2024

Instead of using a Redis-based lock to protect concurrent FileBlob uploads and deletes, the code was already changed previously to handle the cases of concurrent uploads, as well as to reduce the likelihood of concurrent deletes by regularly bumping the FileBlob timestamp.

The lock has been disabled via an option recently, and now it is time to completely remove this code.

Instead of using a Redis-based lock to protect concurrent `FileBlob` uploads and deletes,
the code was already changed previously to handle the cases of concurrent uploads,
as well as to reduce the likelihood of concurrent deletes by regularly bumping the `FileBlob` timestamp.

The lock has been disabled via an `option` recently, and now it is time to completely remove this code.
@Swatinem Swatinem requested a review from a team March 5, 2024 09:35
@Swatinem Swatinem self-assigned this Mar 5, 2024
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Mar 5, 2024
Copy link

codecov bot commented Mar 5, 2024

Codecov Report

Attention: Patch coverage is 79.41176% with 7 lines in your changes are missing coverage. Please review.

Project coverage is 84.29%. Comparing base (697fa85) to head (ffad955).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #66297      +/-   ##
==========================================
- Coverage   84.29%   84.29%   -0.01%     
==========================================
  Files        5306     5306              
  Lines      237095   237013      -82     
  Branches    41029    41014      -15     
==========================================
- Hits       199859   199781      -78     
+ Misses      37017    37013       -4     
  Partials      219      219              
Files Coverage Δ
src/sentry/models/files/utils.py 84.37% <90.90%> (-2.59%) ⬇️
src/sentry/tasks/files.py 84.61% <66.66%> (-0.46%) ⬇️
src/sentry/models/files/abstractfileblob.py 89.62% <75.00%> (+1.79%) ⬆️

... and 8 files with indirect coverage changes

@Swatinem Swatinem merged commit 0ce27d0 into master Mar 5, 2024
49 of 50 checks passed
@Swatinem Swatinem deleted the swatinem/no-locked-blob branch March 5, 2024 12:37
Copy link

sentry-io bot commented Mar 6, 2024

Suspect Issues

This pull request was deployed and Sentry observed the following issues:

  • ‼️ ReadTimeoutError: HTTPConnectionPool(host='filestore.service.us-central1.consul.', port=80): Read timed out. (read ... /api/0/organizations/{organization_slug}/chunk-... View Issue
  • ‼️ MaxRetryError: HTTPConnectionPool(host='filestore.service.us-central1.consul.', port=80): Max retries exceeded w... /api/0/organizations/{organization_slug}/chunk-... View Issue
  • ‼️ ReadTimeoutError: HTTPConnectionPool(host='filestore.service.us-central1.consul.', port=80): Read timed out. (read ... /api/0/projects/{organization_slug}/{project_sl... View Issue

Did you find this useful? React with a 👍 or 👎

aliu3ntry pushed a commit that referenced this pull request Mar 6, 2024
Instead of using a Redis-based lock to protect concurrent `FileBlob`
uploads and deletes, the code was already changed previously to handle
the cases of concurrent uploads, as well as to reduce the likelihood of
concurrent deletes by regularly bumping the `FileBlob` timestamp.

The lock has been disabled via an `option` recently, and now it is time
to completely remove this code.
@github-actions github-actions bot locked and limited conversation to collaborators Mar 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Scope: Backend Automatically applied to PRs that change backend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants