You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pekko.apache.org by he...@apache.org on 2024/04/13 06:21:53 UTC
(pekko-persistence-jdbc) branch main updated (397d435 -> 333613b)
This is an automated email from the ASF dual-hosted git repository.
hepin pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/pekko-persistence-jdbc.git
from 397d435 Update sbt-site-paradox to 1.7.0 (#173)
new a1ace88 use new Source.queue to avoid memory leak
new a897fac made it private
new 333613b fix mima
The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../mima-filters/1.1.x.backwards.excludes/BaseDao.excludes | 2 ++
.../apache/pekko/persistence/jdbc/journal/dao/BaseDao.scala | 10 +++++-----
2 files changed, 7 insertions(+), 5 deletions(-)
create mode 100644 core/src/main/mima-filters/1.1.x.backwards.excludes/BaseDao.excludes
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pekko.apache.org
For additional commands, e-mail: commits-help@pekko.apache.org
(pekko-persistence-jdbc) 02/03: made it private
Posted by he...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
hepin pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/pekko-persistence-jdbc.git
commit a897fac1681b81550596ff2116618a3b5ed6b4c1
Author: JingZhang Chen <iR...@gmail.com>
AuthorDate: Fri Apr 12 13:43:57 2024 +0800
made it private
---
.../scala/org/apache/pekko/persistence/jdbc/journal/dao/BaseDao.scala | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/core/src/main/scala/org/apache/pekko/persistence/jdbc/journal/dao/BaseDao.scala b/core/src/main/scala/org/apache/pekko/persistence/jdbc/journal/dao/BaseDao.scala
index 9b58cb6..4bd0114 100644
--- a/core/src/main/scala/org/apache/pekko/persistence/jdbc/journal/dao/BaseDao.scala
+++ b/core/src/main/scala/org/apache/pekko/persistence/jdbc/journal/dao/BaseDao.scala
@@ -29,7 +29,7 @@ abstract class BaseDao[T] {
def baseDaoConfig: BaseDaoConfig
- val writeQueue: BoundedSourceQueue[(Promise[Unit], Seq[T])] = Source
+ private val writeQueue: BoundedSourceQueue[(Promise[Unit], Seq[T])] = Source
.queue[(Promise[Unit], Seq[T])](baseDaoConfig.bufferSize)
.batchWeighted[(Seq[Promise[Unit]], Seq[T])](baseDaoConfig.batchSize, _._2.size, tup => Vector(tup._1) -> tup._2) {
case ((promises, rows), (newPromise, newRows)) => (promises :+ newPromise) -> (rows ++ newRows)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pekko.apache.org
For additional commands, e-mail: commits-help@pekko.apache.org
(pekko-persistence-jdbc) 01/03: use new Source.queue to avoid memory leak
Posted by he...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
hepin pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/pekko-persistence-jdbc.git
commit a1ace88d66e297238045213af3b646d768992dd3
Author: JingZhang Chen <iR...@gmail.com>
AuthorDate: Fri Apr 12 10:15:29 2024 +0800
use new Source.queue to avoid memory leak
---
.../mima-filters/1.1.x.backwards.excludes/BaseDao.excludes | 1 +
.../apache/pekko/persistence/jdbc/journal/dao/BaseDao.scala | 10 +++++-----
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/core/src/main/mima-filters/1.1.x.backwards.excludes/BaseDao.excludes b/core/src/main/mima-filters/1.1.x.backwards.excludes/BaseDao.excludes
new file mode 100644
index 0000000..76a9065
--- /dev/null
+++ b/core/src/main/mima-filters/1.1.x.backwards.excludes/BaseDao.excludes
@@ -0,0 +1 @@
+ProblemFilters.exclude[IncompatibleResultTypeProblem]("org.apache.pekko.persistence.jdbc.journal.dao.BaseDao.writeQueue")
diff --git a/core/src/main/scala/org/apache/pekko/persistence/jdbc/journal/dao/BaseDao.scala b/core/src/main/scala/org/apache/pekko/persistence/jdbc/journal/dao/BaseDao.scala
index 333b2c5..9b58cb6 100644
--- a/core/src/main/scala/org/apache/pekko/persistence/jdbc/journal/dao/BaseDao.scala
+++ b/core/src/main/scala/org/apache/pekko/persistence/jdbc/journal/dao/BaseDao.scala
@@ -16,8 +16,8 @@ package org.apache.pekko.persistence.jdbc.journal.dao
import org.apache.pekko
import pekko.persistence.jdbc.config.BaseDaoConfig
-import pekko.stream.scaladsl.{ Keep, Sink, Source, SourceQueueWithComplete }
-import pekko.stream.{ Materializer, OverflowStrategy, QueueOfferResult }
+import pekko.stream.scaladsl.{ Keep, Sink, Source }
+import pekko.stream.{ BoundedSourceQueue, Materializer, QueueOfferResult }
import scala.collection.immutable.{ Seq, Vector }
import scala.concurrent.{ ExecutionContext, Future, Promise }
@@ -29,8 +29,8 @@ abstract class BaseDao[T] {
def baseDaoConfig: BaseDaoConfig
- val writeQueue: SourceQueueWithComplete[(Promise[Unit], Seq[T])] = Source
- .queue[(Promise[Unit], Seq[T])](baseDaoConfig.bufferSize, OverflowStrategy.dropNew)
+ val writeQueue: BoundedSourceQueue[(Promise[Unit], Seq[T])] = Source
+ .queue[(Promise[Unit], Seq[T])](baseDaoConfig.bufferSize)
.batchWeighted[(Seq[Promise[Unit]], Seq[T])](baseDaoConfig.batchSize, _._2.size, tup => Vector(tup._1) -> tup._2) {
case ((promises, rows), (newPromise, newRows)) => (promises :+ newPromise) -> (rows ++ newRows)
}
@@ -46,7 +46,7 @@ abstract class BaseDao[T] {
def queueWriteJournalRows(xs: Seq[T]): Future[Unit] = {
val promise = Promise[Unit]()
- writeQueue.offer(promise -> xs).flatMap {
+ writeQueue.offer(promise -> xs) match {
case QueueOfferResult.Enqueued =>
promise.future
case QueueOfferResult.Failure(t) =>
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pekko.apache.org
For additional commands, e-mail: commits-help@pekko.apache.org
(pekko-persistence-jdbc) 03/03: fix mima
Posted by he...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
hepin pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/pekko-persistence-jdbc.git
commit 333613b2b230fa97f6851352e82d500285b02c32
Author: JingZhang Chen <iR...@gmail.com>
AuthorDate: Fri Apr 12 13:48:12 2024 +0800
fix mima
---
core/src/main/mima-filters/1.1.x.backwards.excludes/BaseDao.excludes | 1 +
1 file changed, 1 insertion(+)
diff --git a/core/src/main/mima-filters/1.1.x.backwards.excludes/BaseDao.excludes b/core/src/main/mima-filters/1.1.x.backwards.excludes/BaseDao.excludes
index 76a9065..79eeae1 100644
--- a/core/src/main/mima-filters/1.1.x.backwards.excludes/BaseDao.excludes
+++ b/core/src/main/mima-filters/1.1.x.backwards.excludes/BaseDao.excludes
@@ -1 +1,2 @@
ProblemFilters.exclude[IncompatibleResultTypeProblem]("org.apache.pekko.persistence.jdbc.journal.dao.BaseDao.writeQueue")
+ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.pekko.persistence.jdbc.journal.dao.BaseDao.writeQueue")
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pekko.apache.org
For additional commands, e-mail: commits-help@pekko.apache.org