He-Pin commented on code in PR #180:
URL:
https://github.com/apache/pekko-persistence-jdbc/pull/180#discussion_r1581741042
##########
core/src/main/scala/org/apache/pekko/persistence/jdbc/journal/dao/BaseJournalDaoWithReadMessages.scala:
##########
@@ -38,13 +38,28 @@ trait BaseJournalDaoWithReadMessages extends
JournalDaoWithReadMessages {
toSequenceNr: Long,
batchSize: Int,
refreshInterval: Option[(FiniteDuration, Scheduler)]):
Source[Try[(PersistentRepr, Long)], NotUsed] = {
+ internalBatchStream(persistenceId, fromSequenceNr, toSequenceNr,
batchSize, refreshInterval).mapConcat(identity)
+ }
+ /**
+ * separate this method for unit tests.
+ */
+ @InternalApi
+ private[dao] def internalBatchStream(persistenceId: String,
+ fromSequenceNr: Long,
+ toSequenceNr: Long,
+ batchSize: Int,
+ refreshInterval: Option[(FiniteDuration, Scheduler)]) = {
Review Comment:
and add checking for where `fromSequenceNr > toSequenceNr` too
--
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]