Skip to content

Commit

Permalink
Bump to R2DBC with fix
Browse files Browse the repository at this point in the history
  • Loading branch information
johanandren committed Oct 19, 2023
1 parent 86135c0 commit 23f8350
Show file tree
Hide file tree
Showing 11 changed files with 19 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,6 @@ private[projection] class R2dbcOffsetStore(
FutureDuplicate
} else if (recordWithOffset.fromSnapshot) {
// snapshots will mean we are starting from some arbitrary offset after last seen offset
// FIXME this is the dangerous scenario, we've seen events, projection stopped and now it started again from a snap
FutureAccepted
} else if (!recordWithOffset.fromBacktracking) {
logUnexpected()
Expand Down Expand Up @@ -871,8 +870,7 @@ private[projection] class R2dbcOffsetStore(
strictSeqNr = true,
fromBacktracking = EnvelopeOrigin.fromBacktracking(eventEnvelope),
fromPubSub = EnvelopeOrigin.fromPubSub(eventEnvelope),
// FIXME move constant and check to EnvelopeOrigin
fromSnapshot = eventEnvelope.source == "SN"))
fromSnapshot = EnvelopeOrigin.fromSnapshot(eventEnvelope)))
case change: UpdatedDurableState[_] if change.offset.isInstanceOf[TimestampOffset] =>
val timestampOffset = change.offset.asInstanceOf[TimestampOffset]
val slice = persistenceExt.sliceForPersistenceId(change.persistenceId)
Expand Down
2 changes: 1 addition & 1 deletion project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ object Dependencies {
val akka = sys.props.getOrElse("build.akka.version", "2.9.0-M3")
val akkaPersistenceCassandra = "1.2.0-M1"
val akkaPersistenceJdbc = "5.3.0-M1"
val akkaPersistenceR2dbc = "1.2.0-M6+2-ac251350+20231019-1335"
val akkaPersistenceR2dbc = "1.2.0-M7"
val alpakka = "7.0.0-M2"
val alpakkaKafka = sys.props.getOrElse("build.alpakka.kafka.version", "5.0.0-M1")
val slick = "3.4.1"
Expand Down
2 changes: 1 addition & 1 deletion samples/grpc/iot-service-scala/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Global / cancelable := false // ctrl-c
val AkkaVersion = "2.9.0-M3"
val AkkaHttpVersion = "10.6.0-M2"
val AkkaManagementVersion = "1.5.0-M1"
val AkkaPersistenceR2dbcVersion = "1.2.0-M6"
val AkkaPersistenceR2dbcVersion = "v1.2.0-M7"
val AkkaProjectionVersion =
sys.props.getOrElse("akka-projection.version", "1.5.0-M5")
val AkkaDiagnosticsVersion = "2.1.0-M1"
Expand Down
2 changes: 1 addition & 1 deletion samples/grpc/local-drone-control-java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<akka.version>2.9.0-M3</akka.version>
<akka-projection.version>1.5.0-M5</akka-projection.version>
<akka-persistence-r2dbc.version>1.2.0-M6</akka-persistence-r2dbc.version>
<akka-persistence-r2dbc.version>v1.2.0-M7</akka-persistence-r2dbc.version>
<akka-management.version>1.5.0-M1</akka-management.version>
<akka-diagnostics.version>2.1.0-M1</akka-diagnostics.version>
<akka-http.version>10.5.1</akka-http.version>
Expand Down
14 changes: 9 additions & 5 deletions samples/grpc/local-drone-control-scala/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ name := "local-drone-control"

organization := "com.lightbend.akka.samples"
organizationHomepage := Some(url("https://akka.io"))
licenses := Seq(("CC0", url("https://creativecommons.org/publicdomain/zero/1.0")))
licenses := Seq(
("CC0", url("https://creativecommons.org/publicdomain/zero/1.0")))

resolvers += "Akka library repository".at("https://repo.akka.io/maven")

Expand Down Expand Up @@ -33,7 +34,7 @@ Global / cancelable := false // ctrl-c
val AkkaVersion = "2.9.0-M3"
val AkkaHttpVersion = "10.6.0-M2"
val AkkaManagementVersion = "1.5.0-M1"
val AkkaPersistenceR2dbcVersion = "1.2.0-M6"
val AkkaPersistenceR2dbcVersion = "1.2.0-M7"
val AkkaProjectionVersion =
sys.props.getOrElse("akka-projection.version", "1.5.0-M5")
val AkkaDiagnosticsVersion = "2.1.0-M1"
Expand Down Expand Up @@ -102,9 +103,12 @@ nativeImageOptions := Seq(
"-Dlogback.configurationFile=logback-native-image.xml" // configured at build time
)

NativeImage / mainClass := sys.props.get("native.mode").collect {
case "clustered" => "local.drones.ClusteredMain"
}.orElse((Compile / run / mainClass).value)
NativeImage / mainClass := sys.props
.get("native.mode")
.collect { case "clustered" =>
"local.drones.ClusteredMain"
}
.orElse((Compile / run / mainClass).value)

// silence warnings for these keys (used in dynamic task)
Global / excludeLintKeys ++= Set(nativeImageJvm, nativeImageVersion)
2 changes: 1 addition & 1 deletion samples/grpc/shopping-analytics-service-java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<akka.version>2.9.0-M3</akka.version>
<akka-projection.version>1.5.0-M5</akka-projection.version>
<akka-persistence-r2dbc.version>1.2.0-M6</akka-persistence-r2dbc.version>
<akka-persistence-r2dbc.version>v1.2.0-M7</akka-persistence-r2dbc.version>
<akka-management.version>1.5.0-M1</akka-management.version>
<akka-diagnostics.version>2.1.0-M1</akka-diagnostics.version>
<akka-grpc.version>2.4.0-M2</akka-grpc.version>
Expand Down
2 changes: 1 addition & 1 deletion samples/grpc/shopping-analytics-service-scala/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Global / cancelable := false // ctrl-c
val AkkaVersion = "2.9.0-M3"
val AkkaHttpVersion = "10.6.0-M2"
val AkkaManagementVersion = "1.5.0-M1"
val AkkaPersistenceR2dbcVersion = "1.2.0-M6"
val AkkaPersistenceR2dbcVersion = "v1.2.0-M7"
val AkkaProjectionVersion =
sys.props.getOrElse("akka-projection.version", "1.5.0-M5")
val AkkaDiagnosticsVersion = "2.1.0-M1"
Expand Down
2 changes: 1 addition & 1 deletion samples/grpc/shopping-cart-service-java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<akka.version>2.9.0-M3</akka.version>
<akka-projection.version>1.5.0-M5</akka-projection.version>
<akka-persistence-r2dbc.version>1.2.0-M6</akka-persistence-r2dbc.version>
<akka-persistence-r2dbc.version>v1.2.0-M7</akka-persistence-r2dbc.version>
<akka-management.version>1.5.0-M1</akka-management.version>
<akka-diagnostics.version>2.1.0-M1</akka-diagnostics.version>
<akka-grpc.version>2.4.0-M2</akka-grpc.version>
Expand Down
2 changes: 1 addition & 1 deletion samples/grpc/shopping-cart-service-scala/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Global / cancelable := false // ctrl-c
val AkkaVersion = "2.9.0-M3"
val AkkaHttpVersion = "10.6.0-M2"
val AkkaManagementVersion = "1.5.0-M1"
val AkkaPersistenceR2dbcVersion = "1.2.0-M6"
val AkkaPersistenceR2dbcVersion = "v1.2.0-M7"
val AkkaProjectionVersion =
sys.props.getOrElse("akka-projection.version", "1.5.0-M5")
val AkkaDiagnosticsVersion = "2.1.0-M1"
Expand Down
2 changes: 1 addition & 1 deletion samples/replicated/shopping-cart-service-java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<akka.version>2.9.0-M3</akka.version>
<akka-projection.version>1.5.0-M5</akka-projection.version>
<akka-persistence-r2dbc.version>1.2.0-M6</akka-persistence-r2dbc.version>
<akka-persistence-r2dbc.version>v1.2.0-M7</akka-persistence-r2dbc.version>
<akka-management.version>1.5.0-M1</akka-management.version>
<akka-diagnostics.version>2.1.0-M1</akka-diagnostics.version>
<akka-grpc.version>2.4.0-M2</akka-grpc.version>
Expand Down
2 changes: 1 addition & 1 deletion samples/replicated/shopping-cart-service-scala/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Global / cancelable := false // ctrl-c
val AkkaVersion = sys.props.getOrElse("akka.version", "2.9.0-M3")
val AkkaHttpVersion = "10.6.0-M2"
val AkkaManagementVersion = "1.5.0-M1"
val AkkaPersistenceR2dbcVersion = "1.2.0-M6"
val AkkaPersistenceR2dbcVersion = "v1.2.0-M7"
val AkkaProjectionVersion =
sys.props.getOrElse("akka-projection.version", "1.5.0-M5")
val AkkaDiagnosticsVersion = "2.1.0-M1"
Expand Down

0 comments on commit 23f8350

Please sign in to comment.