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

Cleanup database at exit, use write-ahead logging #696

Merged
merged 10 commits into from
Dec 16, 2020
Merged

Cleanup database at exit, use write-ahead logging #696

merged 10 commits into from
Dec 16, 2020

Conversation

samuel-w
Copy link
Contributor

m3nu
m3nu previously approved these changes Oct 31, 2020
@m3nu
Copy link
Contributor

m3nu commented Oct 31, 2020

We should look into async/await. Maybe some startup tasks can be offloaded.

@samuel-w
Copy link
Contributor Author

@m3nu
Copy link
Contributor

m3nu commented Nov 18, 2020

Is it worth making startup slower for this low-priority task? How about doing it in the background with the scheduler or when closing?

@samuel-w
Copy link
Contributor Author

I moved it so it runs right before exiting.

m3nu
m3nu previously approved these changes Nov 18, 2020
@samuel-w samuel-w changed the title Cleanup database at startup Cleanup database at exit Nov 18, 2020
@samuel-w samuel-w marked this pull request as draft December 3, 2020 08:18
@samuel-w
Copy link
Contributor Author

samuel-w commented Dec 3, 2020

Added write-ahead logging https://www.sqlite.org/wal.html. It speeds up tests a lot, 30 sec to 16 sec.

@samuel-w samuel-w marked this pull request as ready for review December 3, 2020 08:22
@samuel-w samuel-w changed the title Cleanup database at exit Cleanup database at exit, use write-ahead logging Dec 3, 2020
@samuel-w
Copy link
Contributor Author

samuel-w commented Dec 3, 2020

Strange. The tests aren't faster in the CI, but they are faster on my local machine. Still useful though.

@codecov-io
Copy link

codecov-io commented Dec 13, 2020

Codecov Report

Merging #696 (364f301) into master (abd41b9) will increase coverage by 2.64%.
The diff coverage is 60.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #696      +/-   ##
==========================================
+ Coverage   70.85%   73.50%   +2.64%     
==========================================
  Files          53       53              
  Lines        3507     3510       +3     
==========================================
+ Hits         2485     2580      +95     
+ Misses       1022      930      -92     
Impacted Files Coverage Δ
src/vorta/__main__.py 0.00% <0.00%> (ø)
src/vorta/models.py 80.80% <50.00%> (+0.19%) ⬆️
src/vorta/application.py 58.08% <100.00%> (+0.31%) ⬆️
src/vorta/borg/borg_thread.py 79.28% <0.00%> (+1.77%) ⬆️
src/vorta/config.py 100.00% <0.00%> (+5.55%) ⬆️
src/vorta/network_status/abc.py 88.23% <0.00%> (+5.88%) ⬆️
src/vorta/utils.py 60.86% <0.00%> (+6.52%) ⬆️
src/vorta/keyring/abc.py 88.23% <0.00%> (+8.82%) ⬆️
src/vorta/notifications.py 84.84% <0.00%> (+13.63%) ⬆️
... and 3 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update abd41b9...364f301. Read the comment docs.

@m3nu m3nu self-assigned this Dec 15, 2020
@m3nu m3nu merged commit 3112a11 into borgbase:master Dec 16, 2020
@samuel-w samuel-w deleted the vacuum branch December 16, 2020 04:56
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.

3 participants