suvodeep-pyne commented on a change in pull request #5740: URL: https://github.com/apache/incubator-pinot/pull/5740#discussion_r462001207
########## File path: thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/detection/yaml/YamlResource.java ########## @@ -236,10 +236,17 @@ private void createYamlOnboardingTask(long configId, long tuningWindowStart, lon info.setTuningWindowStart(tuningWindowStart); info.setTuningWindowEnd(tuningWindowEnd); info.setEnd(System.currentTimeMillis()); - info.setStart(info.getEnd() - ONBOARDING_REPLAY_LOOKBACK); + + long lastTimestamp = detectionConfig.getLastTimestamp(); + // If no value is present, set the default lookback + if (lastTimestamp < 0) { Review comment: Hey @akshayrai During `org.apache.pinot.thirdeye.detection.yaml.translator.DetectionConfigTranslator#generateDetectionConfig`, the default is always set to `-1` in which case, it is set to `System.currentTimeMillis()`. ref: `org/apache/pinot/thirdeye/detection/yaml/YamlResource.java:242` ########## File path: thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/detection/yaml/YamlResource.java ########## @@ -236,10 +236,17 @@ private void createYamlOnboardingTask(long configId, long tuningWindowStart, lon info.setTuningWindowStart(tuningWindowStart); info.setTuningWindowEnd(tuningWindowEnd); info.setEnd(System.currentTimeMillis()); - info.setStart(info.getEnd() - ONBOARDING_REPLAY_LOOKBACK); + + long lastTimestamp = detectionConfig.getLastTimestamp(); + // If no value is present, set the default lookback + if (lastTimestamp < 0) { Review comment: Hey @akshayrai During `org.apache.pinot.thirdeye.detection.yaml.translator.DetectionConfigTranslator#generateDetectionConfig`, the default is always set to `-1` in which case, it is set to 30 days before current time. ref: `org/apache/pinot/thirdeye/detection/yaml/YamlResource.java:242` I can simplify that a bit but then the `YamlResource` default needs to accessed from the translator which I found to be a bit confusing. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org