xiaohui-sun closed pull request #3581: [TE] rootcause - Round end time after 
adjusting with the maxDateTime
URL: https://github.com/apache/incubator-pinot/pull/3581
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/thirdeye/thirdeye-pinot/src/main/java/com/linkedin/thirdeye/dashboard/resources/v2/TimeSeriesResource.java
 
b/thirdeye/thirdeye-pinot/src/main/java/com/linkedin/thirdeye/dashboard/resources/v2/TimeSeriesResource.java
index d6a80a53fb..c92e44009e 100644
--- 
a/thirdeye/thirdeye-pinot/src/main/java/com/linkedin/thirdeye/dashboard/resources/v2/TimeSeriesResource.java
+++ 
b/thirdeye/thirdeye-pinot/src/main/java/com/linkedin/thirdeye/dashboard/resources/v2/TimeSeriesResource.java
@@ -98,14 +98,15 @@ public TimeSeriesCompareMetricView getTimeseriesCompareData(
       DatasetConfigDTO datasetConfig = 
DAO_REGISTRY.getDatasetConfigDAO().findByDataset(dataset);
       long maxDataTime = datasetMaxDataTimeCache.get(dataset);
 
-      currentEnd = roundEndTimeByGranularity(currentEnd, datasetConfig);
-      baselineEnd = roundEndTimeByGranularity(baselineEnd, datasetConfig);
       if (currentEnd > maxDataTime) {
         long delta = currentEnd - maxDataTime;
         currentEnd = currentEnd - delta;
         baselineEnd = baselineStart + (currentEnd - currentStart);
       }
 
+      currentEnd = roundEndTimeByGranularity(currentEnd, datasetConfig);
+      baselineEnd = roundEndTimeByGranularity(baselineEnd, datasetConfig);
+
       long analysisDuration = currentEnd - currentStart;
       if (baselineEnd - baselineStart != analysisDuration) {
         baselineEnd = baselineStart + analysisDuration;


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to