Roiocam commented on code in PR #195:
URL: 
https://github.com/apache/pekko-persistence-jdbc/pull/195#discussion_r1615724630


##########
core/src/main/scala/org/apache/pekko/persistence/jdbc/journal/dao/BaseJournalDaoWithReadMessages.scala:
##########
@@ -51,17 +51,24 @@ trait BaseJournalDaoWithReadMessages extends 
JournalDaoWithReadMessages {
       toSequenceNr: Long,
       batchSize: Int,
       refreshInterval: Option[(FiniteDuration, Scheduler)]) = {
+    val firstSequenceVer: Long = Math.max(1, fromSequenceNr)
     Source
-      .unfoldAsync[(Long, FlowControl), Seq[Try[(PersistentRepr, 
Long)]]]((Math.max(1, fromSequenceNr), Continue)) {
+      .unfoldAsync[(Long, FlowControl), Seq[Try[(PersistentRepr, 
Long)]]]((firstSequenceVer, Continue)) {
         case (from, control) =>
-          def limitWindow(from: Long): Long = {
-            math.min(from + batchSize, toSequenceNr)
+          def limitWindow(from: Long)(implicit fallback: Boolean): Long = {

Review Comment:
   I am not sure if this parameter should be implicit or not, And I will adopt 
the appropriate suggestions and modify it.



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