akshayrai commented on a change in pull request #4890: [TE] Stop producing so
many logs -- don't check for holes in the middle of timeseries for complete
cache misses
URL: https://github.com/apache/incubator-pinot/pull/4890#discussion_r354435183
##########
File path:
thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/detection/cache/ThirdEyeCacheResponse.java
##########
@@ -127,26 +127,29 @@ public boolean isMissingEndSlice(long sliceEnd) {
*/
private void checkAndLogMissingMiddleSlices() {
- List<String> missingTimestamps = new ArrayList<>();
- long timeGranularity =
request.getRequest().getGroupByTimeGranularity().toMillis();
-
- // remember that we return the cached timeseries in sorted order,
- // but this assumption is not necessarily true if mergeSliceIntoRows() has
been called.
- for (int i = 1; i < timeSeriesRows.size(); i++) {
- long previousTimestamp = timeSeriesRows.get(i - 1).getTimestamp();
- long currentTimestamp = timeSeriesRows.get(i).getTimestamp();
-
- // add all missing timestamps between previous timestamp and current
timestamp to
- // the list of missing timestamps.
- while (previousTimestamp + timeGranularity < currentTimestamp) {
- missingTimestamps.add(String.valueOf(previousTimestamp +
timeGranularity));
- previousTimestamp += timeGranularity;
+ if (!this.hasNoRows()) {
Review comment:
call it isEmpty instead of hasNoRows. Much simpler to read.
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]