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

Optimize update_uploads #783

Merged
merged 1 commit into from
Oct 15, 2024
Merged

Optimize update_uploads #783

merged 1 commit into from
Oct 15, 2024

Conversation

Swatinem
Copy link
Contributor

The previous code was doing a SELECT/UPDATE cycle for each of the Upload records needing updates. This will now avoid doing the SELECTs, and only emit UPDATE statements.

As a driveby change, this should also fix an edge-case where a deleted session_id is immediately being reused.

The previous code was doing a SELECT/UPDATE cycle for each of the `Upload` records needing updates.
This will now avoid doing the SELECTs, and only emit `UPDATE` statements.

As a driveby change, this should also fix an edge-case where a deleted `session_id` is immediately being reused.
@Swatinem Swatinem requested a review from a team October 15, 2024 10:24
@Swatinem Swatinem self-assigned this Oct 15, 2024
Copy link

codecov bot commented Oct 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.03%. Comparing base (3853a7d) to head (282714e).
Report is 1 commits behind head on main.

✅ All tests successful. No failed tests found.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #783      +/-   ##
==========================================
- Coverage   98.03%   98.03%   -0.01%     
==========================================
  Files         442      442              
  Lines       36602    36601       -1     
==========================================
- Hits        35883    35882       -1     
  Misses        719      719              
Flag Coverage Δ
integration 98.03% <100.00%> (-0.01%) ⬇️
unit 98.03% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
NonTestCode 95.92% <100.00%> (-0.01%) ⬇️
OutsideTasks 97.99% <100.00%> (-0.01%) ⬇️
Files with missing lines Coverage Δ
services/processing/merging.py 93.75% <100.00%> (ø)
services/report/__init__.py 97.19% <100.00%> (-0.01%) ⬇️
services/tests/test_report.py 100.00% <100.00%> (ø)

@codecov-qa
Copy link

codecov-qa bot commented Oct 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.03%. Comparing base (3853a7d) to head (282714e).
Report is 1 commits behind head on main.

✅ All tests successful. No failed tests found.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #783      +/-   ##
==========================================
- Coverage   98.03%   98.03%   -0.01%     
==========================================
  Files         442      442              
  Lines       36602    36601       -1     
==========================================
- Hits        35883    35882       -1     
  Misses        719      719              
Flag Coverage Δ
integration 98.03% <100.00%> (-0.01%) ⬇️
unit 98.03% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
NonTestCode 95.92% <100.00%> (-0.01%) ⬇️
OutsideTasks 97.99% <100.00%> (-0.01%) ⬇️
Files with missing lines Coverage Δ
services/processing/merging.py 93.75% <100.00%> (ø)
services/report/__init__.py 97.19% <100.00%> (-0.01%) ⬇️
services/tests/test_report.py 100.00% <100.00%> (ø)

@codecov-notifications
Copy link

codecov-notifications bot commented Oct 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

✅ All tests successful. No failed tests found.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #783      +/-   ##
==========================================
- Coverage   98.03%   98.03%   -0.01%     
==========================================
  Files         442      442              
  Lines       36602    36601       -1     
==========================================
- Hits        35883    35882       -1     
  Misses        719      719              
Flag Coverage Δ
integration 98.03% <100.00%> (-0.01%) ⬇️
unit 98.03% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
NonTestCode 95.92% <100.00%> (-0.01%) ⬇️
OutsideTasks 97.99% <100.00%> (-0.01%) ⬇️
Files with missing lines Coverage Δ
services/processing/merging.py 93.75% <100.00%> (ø)
services/report/__init__.py 97.19% <100.00%> (-0.01%) ⬇️
services/tests/test_report.py 100.00% <100.00%> (ø)

Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.03%. Comparing base (3853a7d) to head (282714e).

✅ All tests successful. No failed tests found.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #783      +/-   ##
==========================================
- Coverage   98.03%   98.03%   -0.01%     
==========================================
  Files         442      442              
  Lines       36602    36601       -1     
==========================================
- Hits        35883    35882       -1     
  Misses        719      719              
Flag Coverage Δ
integration 98.03% <100.00%> (-0.01%) ⬇️
unit 98.03% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
NonTestCode 95.92% <100.00%> (-0.01%) ⬇️
OutsideTasks 97.99% <100.00%> (-0.01%) ⬇️
Files Coverage Δ
services/processing/merging.py 93.75% <100.00%> (ø)
services/report/__init__.py 97.19% <100.00%> (-0.01%) ⬇️
services/tests/test_report.py 100.00% <100.00%> (ø)

@Swatinem Swatinem added this pull request to the merge queue Oct 15, 2024
Merged via the queue into main with commit 70406db Oct 15, 2024
26 of 27 checks passed
@Swatinem Swatinem deleted the swatinem/opt-updateuploads branch October 15, 2024 11:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants