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

feat: improve SQLite performance #1024

Merged
merged 22 commits into from
Jan 2, 2025
Merged

feat: improve SQLite performance #1024

merged 22 commits into from
Jan 2, 2025

Conversation

fmartingr
Copy link
Member

@fmartingr fmartingr commented Dec 10, 2024

  • Improve SQLite performance tuning the parameters in connections
  • Using different connections for reading and writing
  • Added a new withTxRetry method to try and avoid database is busy errors.
  • Code formatting

@fmartingr fmartingr self-assigned this Dec 10, 2024
Copy link

codecov bot commented Dec 10, 2024

Codecov Report

Attention: Patch coverage is 40.00000% with 99 lines in your changes missing coverage. Please review.

Project coverage is 34.64%. Comparing base (45bd4d6) to head (2e674cc).
Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
internal/database/sqlite.go 39.72% 76 Missing and 12 partials ⚠️
internal/database/sqlite_noncgo.go 50.00% 5 Missing and 2 partials ⚠️
internal/database/mysql.go 0.00% 2 Missing ⚠️
internal/database/pg.go 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1024      +/-   ##
==========================================
+ Coverage   34.46%   34.64%   +0.18%     
==========================================
  Files          61       61              
  Lines        5412     5499      +87     
==========================================
+ Hits         1865     1905      +40     
- Misses       3323     3359      +36     
- Partials      224      235      +11     

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

fmartingr and others added 13 commits December 10, 2024 13:15
refactor: Replace errors.WithStack with fmt.Errorf and add proper error handling

fix: Handle potential database connection errors with improved error wrapping

refactor: Replace errors.WithStack with fmt.Errorf and improve error handling

refactor: Replace error handling with fmt.Errorf and proper nil checks

refactor: Replace errors.WithStack with fmt.Errorf and add nil error checks

refactor: Replace errors.WithStack with fmt.Errorf and add nil checks in sqlite.go

refactor: Replace errors.WithStack with fmt.Errorf and add nil checks

refactor: Replace errors.WithStack with fmt.Errorf and improve error handling

refactor: Replace remaining errors.WithStack with fmt.Errorf in sqlite.go
@fmartingr fmartingr added this to the 1.8.0 milestone Jan 1, 2025
@fmartingr fmartingr marked this pull request as ready for review January 2, 2025 08:33
@fmartingr fmartingr merged commit c58c355 into master Jan 2, 2025
17 checks passed
@fmartingr fmartingr deleted the feat/sqlite-performace branch January 2, 2025 08:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

1 participant