Skip to content

Conversation

@Turbo87
Copy link
Member

@Turbo87 Turbo87 commented Nov 19, 2024

Quite a bit of code that is currently within the spawn_blocking() scope isn't using the sync database connection, so we might as well move it outside. One notable exception is the process_tarball() call, which stays within a dedicated spawn_blocking() call for now. While process_tarball() is operating on in-memory bytes and should be fairly fast, we sometimes process multiple megabytes of data here, so we can't rely on this being fast enough for an async thread.

Best reviewed in "ignore whitespace changes" mode 😉

Quite a bit of code that is currently within the `spawn_blocking()` scope isn't using the sync database connection, so we might as well move it outside. One notable exception is the `process_tarball()` call, which stays within a dedicated `spawn_blocking()` call for now. While `process_tarball()` is operating on in-memory bytes and should be fairly fast, we sometimes process multiple megabytes of data here, so we can't rely on this being fast enough for an async thread.
@Turbo87 Turbo87 added C-internal 🔧 Category: Nonessential work that would make the codebase more consistent or clear A-backend ⚙️ labels Nov 19, 2024
@codecov
Copy link

codecov bot commented Nov 19, 2024

Codecov Report

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

Project coverage is 89.18%. Comparing base (d3106cd) to head (6abdc3d).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/controllers/krate/publish.rs 94.35% 7 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #10003      +/-   ##
==========================================
- Coverage   89.19%   89.18%   -0.01%     
==========================================
  Files         295      295              
  Lines       30752    30758       +6     
==========================================
+ Hits        27428    27433       +5     
- Misses       3324     3325       +1     

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


🚨 Try these New Features:

@Turbo87 Turbo87 merged commit a7d1ef4 into rust-lang:main Nov 19, 2024
10 checks passed
@Turbo87 Turbo87 deleted the async-publish branch November 19, 2024 12:49
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.

1 participant