diff --git a/.github/workflows/h2-test.yml b/.github/workflows/h2-test.yml index 2d478e15e..f3ff002fa 100644 --- a/.github/workflows/h2-test.yml +++ b/.github/workflows/h2-test.yml @@ -16,10 +16,10 @@ jobs: fail-fast: false matrix: include: - - { java-version: adopt@1.8, scala-version: 2.12.16, sbt-opts: '' } - - { java-version: adopt@1.8, scala-version: 2.13.8, sbt-opts: '' } - - { java-version: adopt@1.11.0-9, scala-version: 2.12.16, sbt-opts: '-J-XX:+UnlockExperimentalVMOptions -J-XX:+UseJVMCICompiler' } - - { java-version: adopt@1.11.0-9, scala-version: 2.13.8, sbt-opts: '-J-XX:+UnlockExperimentalVMOptions -J-XX:+UseJVMCICompiler' } + - { java-version: adopt@1.8, scala-version: 2.12.x, sbt-opts: '' } + - { java-version: adopt@1.8, scala-version: 2.13.x, sbt-opts: '' } + - { java-version: adopt@1.11.0-9, scala-version: 2.12.x, sbt-opts: '-J-XX:+UnlockExperimentalVMOptions -J-XX:+UseJVMCICompiler' } + - { java-version: adopt@1.11.0-9, scala-version: 2.13.x, sbt-opts: '-J-XX:+UnlockExperimentalVMOptions -J-XX:+UseJVMCICompiler' } steps: - name: Checkout uses: actions/checkout@v2 @@ -45,4 +45,4 @@ jobs: - name: Print logs on failure if: ${{ failure() }} - run: find . -name "*.log" -exec ./scripts/cat-log.sh {} \; \ No newline at end of file + run: find . -name "*.log" -exec ./scripts/cat-log.sh {} \; diff --git a/.github/workflows/mysql-tests.yml b/.github/workflows/mysql-tests.yml index 6ba236b23..fca8afd8f 100644 --- a/.github/workflows/mysql-tests.yml +++ b/.github/workflows/mysql-tests.yml @@ -43,7 +43,7 @@ jobs: run: ./scripts/launch-mysql.sh - name: Run Integration tests for ${{ matrix.name }} - run: sbt "++2.13.4 It/testOnly akka.persistence.jdbc.integration.MySQL*" ${{ matrix.extraOpts }} -J-XX:+UnlockExperimentalVMOptions -J-XX:+UseJVMCICompiler + run: sbt "It/testOnly akka.persistence.jdbc.integration.MySQL*" ${{ matrix.extraOpts }} -J-XX:+UnlockExperimentalVMOptions -J-XX:+UseJVMCICompiler - name: Print logs on failure if: ${{ failure() }} diff --git a/.github/workflows/oracle-tests.yml b/.github/workflows/oracle-tests.yml index 89f2a4450..94dc4bb3d 100644 --- a/.github/workflows/oracle-tests.yml +++ b/.github/workflows/oracle-tests.yml @@ -43,7 +43,7 @@ jobs: run: ./scripts/launch-oracle.sh - name: Run Integration tests for ${{ matrix.name }} - run: sbt "++2.13.4 It/testOnly akka.persistence.jdbc.integration.Oracle*" ${{ matrix.extraOpts }} -J-XX:+UnlockExperimentalVMOptions -J-XX:+UseJVMCICompiler + run: sbt "It/testOnly akka.persistence.jdbc.integration.Oracle*" ${{ matrix.extraOpts }} -J-XX:+UnlockExperimentalVMOptions -J-XX:+UseJVMCICompiler - name: Print logs on failure if: ${{ failure() }} diff --git a/.github/workflows/postgres-tests.yml b/.github/workflows/postgres-tests.yml index b3e7bde50..b0b97818b 100644 --- a/.github/workflows/postgres-tests.yml +++ b/.github/workflows/postgres-tests.yml @@ -43,7 +43,7 @@ jobs: run: ./scripts/launch-postgres.sh - name: Run Integration tests for ${{ matrix.name }} - run: sbt "++2.13.4 It/testOnly akka.persistence.jdbc.integration.Postgres*" ${{ matrix.extraOpts }} -J-XX:+UnlockExperimentalVMOptions -J-XX:+UseJVMCICompiler + run: sbt "It/testOnly akka.persistence.jdbc.integration.Postgres*" ${{ matrix.extraOpts }} -J-XX:+UnlockExperimentalVMOptions -J-XX:+UseJVMCICompiler - name: Print logs on failure if: ${{ failure() }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fe45fdb34..e7d042aec 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -82,4 +82,4 @@ jobs: chmod 600 .github/id_rsa ssh-keygen -p -P "$GUSTAV_PASSPHRASE" -N "" -f .github/id_rsa ssh-add .github/id_rsa - sbt "++2.13.4 docs/publishRsync" + sbt "docs/publishRsync" diff --git a/.github/workflows/sqlserver-tests.yml b/.github/workflows/sqlserver-tests.yml index 46681ad1d..0f486024e 100644 --- a/.github/workflows/sqlserver-tests.yml +++ b/.github/workflows/sqlserver-tests.yml @@ -43,7 +43,7 @@ jobs: run: ./scripts/launch-sqlserver.sh - name: Run Integration tests for ${{ matrix.name }} - run: sbt "++2.13.4 It/testOnly akka.persistence.jdbc.integration.SqlServer*" ${{ matrix.extraOpts }} -J-XX:+UnlockExperimentalVMOptions -J-XX:+UseJVMCICompiler + run: sbt "It/testOnly akka.persistence.jdbc.integration.SqlServer*" ${{ matrix.extraOpts }} -J-XX:+UnlockExperimentalVMOptions -J-XX:+UseJVMCICompiler - name: Print logs on failure if: ${{ failure() }} diff --git a/core/src/main/scala/akka/persistence/jdbc/state/javadsl/JdbcDurableStateStore.scala b/core/src/main/scala/akka/persistence/jdbc/state/javadsl/JdbcDurableStateStore.scala index abaf92fd4..80409aee3 100644 --- a/core/src/main/scala/akka/persistence/jdbc/state/javadsl/JdbcDurableStateStore.scala +++ b/core/src/main/scala/akka/persistence/jdbc/state/javadsl/JdbcDurableStateStore.scala @@ -48,7 +48,11 @@ class JdbcDurableStateStore[A]( def upsertObject(persistenceId: String, revision: Long, value: A, tag: String): CompletionStage[Done] = toJava(scalaStore.upsertObject(persistenceId, revision, value, tag)) - def deleteObject(persistenceId: String): CompletionStage[Done] = + @deprecated(message = "Use the deleteObject overload with revision instead.", since = "1.0.0") + override def deleteObject(persistenceId: String): CompletionStage[Done] = + deleteObject(persistenceId, revision = 0) + + override def deleteObject(persistenceId: String, revision: Long): CompletionStage[Done] = toJava(scalaStore.deleteObject(persistenceId)) def currentChanges(tag: String, offset: Offset): Source[DurableStateChange[A], NotUsed] = diff --git a/core/src/main/scala/akka/persistence/jdbc/state/scaladsl/JdbcDurableStateStore.scala b/core/src/main/scala/akka/persistence/jdbc/state/scaladsl/JdbcDurableStateStore.scala index 5e3bd23a4..b049116fc 100644 --- a/core/src/main/scala/akka/persistence/jdbc/state/scaladsl/JdbcDurableStateStore.scala +++ b/core/src/main/scala/akka/persistence/jdbc/state/scaladsl/JdbcDurableStateStore.scala @@ -101,8 +101,14 @@ class JdbcDurableStateStore[A]( } } - def deleteObject(persistenceId: String): Future[Done] = + @deprecated(message = "Use the deleteObject overload with revision instead.", since = "5.2.0") + override def deleteObject(persistenceId: String): Future[Done] = + deleteObject(persistenceId, revision = 0) + + override def deleteObject(persistenceId: String, revision: Long): Future[Done] = { + // FIXME #686 use revision db.run(queries.deleteFromDb(persistenceId).map(_ => Done)) + } def currentChanges(tag: String, offset: Offset): Source[DurableStateChange[A], NotUsed] = { Source diff --git a/project/Dependencies.scala b/project/Dependencies.scala index 9a851c25c..394519089 100644 --- a/project/Dependencies.scala +++ b/project/Dependencies.scala @@ -6,9 +6,9 @@ object Dependencies { // Keep in sync with .travis.yml val Scala212 = "2.12.16" val Scala213 = "2.13.8" - val ScalaVersions = Seq(Scala212, Scala213) + val ScalaVersions = Seq(Scala213, Scala212) - val AkkaVersion = "2.6.16" + val AkkaVersion = "2.7.0-M1" val AkkaBinaryVersion = AkkaVersion.take(3) val SlickVersion = "3.4.1" diff --git a/project/build.properties b/project/build.properties index 7e51d89b3..33584ad51 100644 --- a/project/build.properties +++ b/project/build.properties @@ -2,4 +2,4 @@ # Copyright 2016 Dennis Vriend # Copyright (C) 2019 - 2022 Lightbend Inc. # -sbt.version=1.6.2 +sbt.version=1.7.1