This is an automated email from the ASF dual-hosted git repository.
fanningpj pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/pekko-persistence-jdbc.git
The following commit(s) were added to refs/heads/main by this push:
new 62d272b remove unused param in JdbcDurableStateStore causing memory
leak, issue 289 (#290)
62d272b is described below
commit 62d272b5b750825392fb49ec34c3f85c8bac7dd6
Author: Andy Hamilton <[email protected]>
AuthorDate: Tue Apr 29 05:04:06 2025 -0500
remove unused param in JdbcDurableStateStore causing memory leak, issue 289
(#290)
---
.../persistence/jdbc/state/scaladsl/JdbcDurableStateStore.scala | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git
a/core/src/main/scala/org/apache/pekko/persistence/jdbc/state/scaladsl/JdbcDurableStateStore.scala
b/core/src/main/scala/org/apache/pekko/persistence/jdbc/state/scaladsl/JdbcDurableStateStore.scala
index b1acbf1..ca05b08 100644
---
a/core/src/main/scala/org/apache/pekko/persistence/jdbc/state/scaladsl/JdbcDurableStateStore.scala
+++
b/core/src/main/scala/org/apache/pekko/persistence/jdbc/state/scaladsl/JdbcDurableStateStore.scala
@@ -169,12 +169,11 @@ class JdbcDurableStateStore[A](
terminateAfterOffset: Option[Long]): Source[DurableStateChange[A],
NotUsed] = {
val batchSize = durableStateConfig.batchSize
- val startingOffsets = List.empty[Long]
implicit val askTimeout: Timeout =
Timeout(durableStateConfig.stateSequenceConfig.askTimeout)
Source
- .unfoldAsync[(Long, FlowControl, List[Long]),
Seq[DurableStateChange[A]]]((offset, Continue, startingOffsets)) {
- case (from, control, s) =>
+ .unfoldAsync[(Long, FlowControl), Seq[DurableStateChange[A]]]((offset,
Continue)) {
+ case (from, control) =>
def retrieveNextBatch() = {
for {
queryUntil <-
stateSequenceActor.ask(GetMaxGlobalOffset).mapTo[MaxGlobalOffset]
@@ -201,7 +200,7 @@ class JdbcDurableStateStore[A](
// Continue querying from the largest offset
xs.map(_.offset.value).max
}
- Some(((nextStartingOffset, nextControl, s :+
nextStartingOffset), xs))
+ Some(((nextStartingOffset, nextControl), xs))
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]