in core/src/main/scala/org/apache/pekko/persistence/r2dbc/internal/BySliceQuery.scala [65:76]
def nextQueryToTimestamp(atLeastNumberOfEvents: Int): Option[Instant] = {
buckets.findTimeForLimit(nextQueryFromTimestamp, atLeastNumberOfEvents) match {
case Some(t) =>
if (backtracking)
if (t.isAfter(latest.timestamp)) Some(latest.timestamp) else Some(t)
else
Some(t)
case None =>
if (backtracking) Some(latest.timestamp)
else None
}
}