-
Notifications
You must be signed in to change notification settings - Fork 157
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 for EventSourcedBehavior #1518
Configuring persistence plugins at runtime for EventSourcedBehavior #1518
Conversation
...e-testkit/src/main/scala/org/apache/pekko/persistence/testkit/PersistenceTestKitPlugin.scala
Outdated
Show resolved
Hide resolved
...n/scala/org/apache/pekko/persistence/testkit/internal/SnapshotStorageEmulatorExtension.scala
Outdated
Show resolved
Hide resolved
...stkit/src/test/scala/org/apache/pekko/persistence/testkit/scaladsl/RuntimeJournalsSpec.scala
Show resolved
Hide resolved
...stkit/src/test/scala/org/apache/pekko/persistence/testkit/scaladsl/RuntimeJournalsSpec.scala
Outdated
Show resolved
Hide resolved
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.
there are quite a lot of changes to constructors - even if they are for internal classes
I don't know but we might want to consider adding secondary constructors that match the existing param lists in the 1.1.2-RC1 release.
...istence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/BehaviorSetup.scala
Outdated
Show resolved
Hide resolved
...istence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/BehaviorSetup.scala
Outdated
Show resolved
Hide resolved
...istence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/BehaviorSetup.scala
Outdated
Show resolved
Hide resolved
@@ -107,14 +113,18 @@ private[pekko] final class BehaviorSetup[C, E, S]( | |||
|
|||
private var recoveryTimer: OptionVal[Cancellable] = OptionVal.None | |||
|
|||
val recoveryEventTimeout: FiniteDuration = persistence |
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.
private please
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.
This is accessed in multiple places of EventSourcedBehavior
state machine - ReplayingEvents
and ReplayingSnapshot
are using this to make error messages, so cannot be made private. Please advise if some different solution is required.
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.
Can you add a @since 1.1.3
annotation to any new public classes, variables or functions?
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.
Just double-checking - is this required for public members of classes marked with @InternalApi
and private[pekko]
?
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.
I'm not sure - this whole PR is looking like something we might need to stick in a future major release as opposed to an upcoming patch release. Leave the since annotations out for now.
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.
Understood. Is there any issue with creating a PR with this code in Akka repository? Wondering about any potential license conflicts, would not want interaction with BSL repositories voiding Pekko of this code.
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.
Feel free to submit this to Akka. You own this code and submitting it Akka does not change that. The problem will only arise if you collaborate on some of the code with a Lightbend employee and then take that collaboration and try to submit that to us.
There are binary compat problems that will require adding an exclude file for.
|
...e-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/EventSourcedBehavior.scala
Outdated
Show resolved
Hide resolved
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.
lgtm
I think the mima excludes are ok for a 1.1.3 release. I guess some other contributor might object but at this stage this has been open for a while. I'll merge but we can re-review if someone comes back with issues. |
@raboof @mdedetrich do you think this causes issues for a 1.1.x release? I think Persistence APIs have been documented to be 'may change'. The bin compat issues in this PR do not appear to likely trouble anyone. |
I can't find any reference to the type Persistence APIs being 'may change' - not in the code nor in the documentation. However, since (we do encourage users inheriting from |
Resolves #1513.