in core/src/main/scala/org/apache/pekko/persistence/cassandra/EventsByTagSettings.scala [101:110]
private def calculatePeriod(from: Long, period: Period, startOfPreviousBucket: Long): Long = {
period match {
case Max =>
metadataCleanupInterval match {
case None => startOfPreviousBucket
case Some(cleanupInterval) => math.max(from - cleanupInterval.toMillis, startOfPreviousBucket)
}
case Fixed(p) => math.max(from - p.toMillis, startOfPreviousBucket)
}
}