pjfanning commented on code in PR #366:
URL: 
https://github.com/apache/pekko-persistence-jdbc/pull/366#discussion_r2529862538


##########
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 worried that `LAST_INSERT_ID()` could return the an id for the wrong 
table (note the sql does not mention a table name) or without trying to read 
all the code, what happens if you have multiple concurrent inserts? - this does 
not seem atomic.



-- 
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]

Reply via email to