refactor: Create database drivers from factories#874
Merged
Conversation
Introduce readable and writable database driver factory interfaces and add factory implementations for the database backends. Factories carry pickable database configuration and create concrete driver instances on demand. This prepares the puller and pusher actors to avoir storing driver instances before process startup.
Update puller and pusher generation to build database driver factories instead of concrete database drivers.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #874 +/- ##
==========================================
- Coverage 76.05% 73.87% -2.18%
==========================================
Files 90 82 -8
Lines 3003 3097 +94
==========================================
+ Hits 2284 2288 +4
- Misses 719 809 +90
🚀 New features to boost your workflow:
|
Use a writable database factory in the pusher actor and create the concrete driver during actor startup, so database resources are initialized inside the actor process.
Use a readable database factory in the puller actor and create the concrete driver from the database poller thread, so database resources are initialized inside the actor process.
a28e682 to
287447b
Compare
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



This PR refactors database driver initialization to rely on database factories instead of prebuilt driver instances.
Puller and pusher actors now receive database factories and create database drivers during initialization.