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

worker/jobs/downloads/update_metadata: Remove crates.downloads column writes #8295

Merged
merged 1 commit into from
Mar 13, 2024

Conversation

Turbo87
Copy link
Member

@Turbo87 Turbo87 commented Mar 13, 2024

This should remove a lot write operations from the crates table and hopefully improve the performance of the database a little bit.

If we see that this does not have the desired effect the following query should copy the values from the new crate_downloads table back into the crates table:

update crates
set downloads = (select downloads from crate_downloads where crate_downloads.crate_id = crates.id);

Related:

@Turbo87 Turbo87 added C-internal 🔧 Category: Nonessential work that would make the codebase more consistent or clear A-backend ⚙️ labels Mar 13, 2024
@Turbo87 Turbo87 requested a review from a team March 13, 2024 09:49
Copy link

codecov bot commented Mar 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.81%. Comparing base (e57f029) to head (33db220).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8295      +/-   ##
==========================================
- Coverage   87.82%   87.81%   -0.01%     
==========================================
  Files         273      273              
  Lines       27522    27516       -6     
==========================================
- Hits        24170    24164       -6     
  Misses       3352     3352              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Turbo87 Turbo87 merged commit cd33a24 into rust-lang:main Mar 13, 2024
8 checks passed
@Turbo87 Turbo87 deleted the crate-downloads-writing branch March 13, 2024 12:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-backend ⚙️ C-internal 🔧 Category: Nonessential work that would make the codebase more consistent or clear
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants