Skip to content

Commit

Permalink
Make sure repair interval is never shorter than initial delay
Browse files Browse the repository at this point in the history
  • Loading branch information
jwaeab committed May 22, 2024
1 parent 2ef0603 commit cf57825
Showing 1 changed file with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -208,10 +208,13 @@ private long newTableRepairedAt()
long initialDelayInMs = myRepairConfiguration.getInitialDelayInMs();
long assumedRepairedAt = System.currentTimeMillis() - runIntervalInMs + initialDelayInMs;

LOG.info("Assuming the table {} is new. Next repair will occur at {}.",
myTableReference,
MY_DATE_FORMAT.get().format(new Date(assumedRepairedAt + runIntervalInMs)));

if (LOG.isInfoEnabled())
{
LOG.info("Assuming the table {} is new. Next repair will occur at {}.",
myTableReference,
MY_DATE_FORMAT.get().format(new Date(assumedRepairedAt + runIntervalInMs)));
}

return assumedRepairedAt;
}

Expand Down

0 comments on commit cf57825

Please sign in to comment.