pjfanning commented on code in PR #366:
URL:
https://github.com/apache/pekko-persistence-jdbc/pull/366#discussion_r2529880436
##########
core/src/main/scala/org/apache/pekko/persistence/jdbc/state/SequenceNextValUpdater.scala:
##########
@@ -90,6 +90,18 @@ import slick.sql.SqlStreamingAction
String]
}
+/**
+ * INTERNAL API
+ */
+@InternalApi private[jdbc] final class MySQLSequenceNextValUpdater(profile:
JdbcProfile)
+ extends SequenceNextValUpdater {
+
+ import profile.api._
+
+ def getSequenceNextValueExpr() =
+ sql"""SELECT LAST_INSERT_ID()""".as[String]
Review Comment:
I'm willing to defer to you on this as you obviously have put thought and
test time into this. One option is to add a config in the reference.conf which
decides which way to get the next ID for MySQL durable state.
Presumably the `SELECT id` is going to slower. But it's potentially useful
for someone to switch to the `SELECT id` if LAST_INSERT_ID causes them issues.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]