-
Notifications
You must be signed in to change notification settings - Fork 8
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
Configuring persistence plugins at runtime #194
base: main
Are you sure you want to change the base?
Conversation
While working on the initial design I spotted few overcomplications with it, particularly when it came to implementation of shared connection factories, so I made a few changes to simplify:
With these changes the other TODOs could be done in their own tickets:
I will look though the PR again for any things that were potentially missed, clean it up and mark as ready for review. |
…e journal and query plugins depend on it
…ion factory provider
b289680
to
efb32d0
Compare
I think this is ready for review. Not sure about the license headers on new files - test is a new creation, so a standard header I think, but two new DAO classes are extracted code from pre-Pekko/Akka split class. Going to fix binary compatibility checks once the code is final. |
Maybe even without the break up of shared settings it would still make sense to put them under |
currently (just for reference)
|
@@ -0,0 +1,312 @@ | |||
/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
new files that are not copies of old Akka files should be given the standard Apache header not the Akka one
I am not sure that renaming so many config settings is a good idea. Can we at least produce a doc that details all the renames? That is a list of c1 becomes c2 pairs. |
Sure I can make a list. We do need to decide if we want to make changes a correct implementation that also support runtime plugin config or want to preserve backwards compatibility. For example, current
We cannot make runtime plugin config work without making plugin configuration self-contained, which it is not right now, so we have to move/rename configuration to some extent to achieve self-containment. If there is great focus on keeping backwards compatibility and sticking to keeping configuration as it is now, then we cannot provide runtime plugin config feature in this repository. This feature will have to be a major release feature, or not a feature at all. What are your thoughts on this @pjfanning? |
And what would be the purpose of this list? Like would it just be a part of release documentation, or something else? If this is about release documentation, then I think we need to finalize the config changes before documenting them. |
And of course there is a spectrum here rather just former or latter, so we need to decide on where we are on the spectrum. There is likely a way to somehow contort this PR into not even requiring a major release, but since config moves/renames were proposed in the initial issue and were not explicitly rejected, I assumed that it is fine. |
I don't mind calling the next release 2.0.0. I just want to limit the breaking changes and be able to fully document the changes. |
Resolves #181.
TODO:
pekko.persistence.rdbc.shared
config.Shared config is now bloated - plugins have access to config keys they are not using. Ideally shared configuration should be broken into multiple feature-specific sub-configs and plugins would only depend on sub-configs that they are using.
With changes to config and
ConnectionFactoryProvider
the connection factories are no longer shared between plugins by default and there is no way to make them shared. Need to re-implement this feature, best idea now seems to be to copypekko-persistence-jdbc
implementation.projection
module.Even though runtime config is available already with
R2dbcProjectionSettings
, changes to config ofcore
module andConnectionFactoryProvider
do affectprojection
module.This PR will become (or already is) rather large, maybe there are sensible ways to break it up. By sensible I mean that the project would be in a releasable state between sub-PRs.