Skip to content

Commit f62b77a

Browse files
committed
Interval schedule should take start time from the request, should not set it to the current time of request execution.
Signed-off-by: Oleg Kravchuk <oleg.ikibo@gmail.com>
1 parent 6810b0c commit f62b77a

File tree

1 file changed

+1
-1
lines changed
  • src/main/kotlin/org/opensearch/indexmanagement/rollup/model

1 file changed

+1
-1
lines changed

src/main/kotlin/org/opensearch/indexmanagement/rollup/model/Rollup.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ data class Rollup(
330330
// TODO: Make startTime public in Job Scheduler so we can just directly check the value
331331
if (seqNo == SequenceNumbers.UNASSIGNED_SEQ_NO || primaryTerm == SequenceNumbers.UNASSIGNED_PRIMARY_TERM) {
332332
if (schedule is IntervalSchedule) {
333-
schedule = IntervalSchedule(Instant.now(), schedule.interval, schedule.unit, schedule.delay ?: 0)
333+
schedule = IntervalSchedule(schedule.startTime, schedule.interval, schedule.unit, schedule.delay ?: 0)
334334
}
335335
}
336336
return Rollup(

0 commit comments

Comments
 (0)