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

Share PGSQL connection pool between ledgers. #86

Merged
merged 3 commits into from
Dec 16, 2021

Conversation

gfyrag
Copy link
Contributor

@gfyrag gfyrag commented Dec 9, 2021

To do this, we introduce a storage.Driver interface between the storage.Factory and the Store implementations.
This interface is in charge of initializing the connection to the underlying database (in case of PGSQL, create the pool) and create the underlying stores for ledgers.

@codecov
Copy link

codecov bot commented Dec 9, 2021

Codecov Report

Merging #86 (9256c6c) into main (42b4183) will increase coverage by 0.38%.
The diff coverage is 80.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #86      +/-   ##
==========================================
+ Coverage   54.51%   54.90%   +0.38%     
==========================================
  Files          38       38              
  Lines        1781     1794      +13     
==========================================
+ Hits          971      985      +14     
+ Misses        714      712       -2     
- Partials       96       97       +1     
Impacted Files Coverage Δ
storage/storage.go 75.00% <76.92%> (+22.05%) ⬆️
storage/postgres/store.go 74.41% <100.00%> (+0.73%) ⬆️

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 04f1d08...9256c6c. Read the comment docs.

@gfyrag gfyrag force-pushed the feature/pgsql-shared-connection-pool branch from c2fa1fb to 1db8bca Compare December 9, 2021 07:58
To do this, we introduce a storage.Driver interface between the storage.Factory and the Store implementations.
This interface is in charge of initializing the connection to the underlying database (in case of PGSQL, create the pool) and create the underlying stores for ledgers.
ledger/ledger_test.go Outdated Show resolved Hide resolved
storage/storage.go Show resolved Hide resolved
storage/postgres/store.go Outdated Show resolved Hide resolved
@flemzord flemzord requested a review from altitude December 9, 2021 12:35
@gfyrag gfyrag merged commit 3f9b5a8 into main Dec 16, 2021
@gfyrag gfyrag deleted the feature/pgsql-shared-connection-pool branch December 16, 2021 16:15
gfyrag added a commit that referenced this pull request Feb 23, 2023
flemzord pushed a commit that referenced this pull request Mar 27, 2023
flemzord pushed a commit that referenced this pull request Apr 18, 2023
flemzord pushed a commit that referenced this pull request Sep 20, 2023
flemzord pushed a commit that referenced this pull request Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants