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

SQLite cache: Use SQLite write-ahead logging for better concurrency #136

Merged
merged 1 commit into from
Apr 20, 2024

Conversation

amotl
Copy link
Contributor

@amotl amotl commented Apr 20, 2024

Problem

@edgarasg reported there is still a problem with the SQLite-based cache and concurrent access.

Solution

@JWCook informed us about the wal=True argument to requests-cache' Session class/mixin, effectively enabling SQLite write-ahead logging, allowing read operations to not block writes.

[1] https://sqlite.org/wal.html

Copy link

codecov bot commented Apr 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.17%. Comparing base (756e395) to head (3fa8a80).

❗ Current head 3fa8a80 differs from pull request most recent head 47348c7. Consider uploading reports for the commit 47348c7 to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #136   +/-   ##
=======================================
  Coverage   87.17%   87.17%           
=======================================
  Files           9        9           
  Lines        1076     1076           
=======================================
  Hits          938      938           
  Misses        138      138           
Flag Coverage Δ
unittests 87.17% <ø> (ø)

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

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

@amotl amotl changed the title SQLite cache: Use SQLite write-ahead logging [1] for better concurrency SQLite cache: Use SQLite write-ahead logging for better concurrency Apr 20, 2024
@amotl amotl marked this pull request as ready for review April 20, 2024 19:54
@amotl amotl merged commit dcfb45e into main Apr 20, 2024
10 checks passed
@amotl amotl deleted the amo/sqlite-wal branch April 20, 2024 19:54
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.

None yet

1 participant