You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by wu...@apache.org on 2020/10/30 15:12:24 UTC

[skywalking] 01/01: Revert "Make the duration error message more specific (#5755)"

This is an automated email from the ASF dual-hosted git repository.

wusheng pushed a commit to branch revert-5755-fix/duration
in repository https://gitbox.apache.org/repos/asf/skywalking.git

commit 6aa54aed2768ce9a2cea70cb2c5093c406cd4fa2
Author: 吴晟 Wu Sheng <wu...@foxmail.com>
AuthorDate: Fri Oct 30 23:12:11 2020 +0800

    Revert "Make the duration error message more specific (#5755)"
    
    This reverts commit 0fb23b87f86742c0c0eddd56436a885e93a8d6dc.
---
 .../apache/skywalking/oap/server/core/query/DurationUtils.java    | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/query/DurationUtils.java b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/query/DurationUtils.java
index 0bf6661..3506318 100644
--- a/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/query/DurationUtils.java
+++ b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/query/DurationUtils.java
@@ -30,8 +30,6 @@ import org.joda.time.format.DateTimeFormatter;
 public enum DurationUtils {
     INSTANCE;
 
-    private static final int MAX_TIME_SPAN = 500;
-
     private static final DateTimeFormatter YYYY_MM_DD = DateTimeFormat.forPattern("yyyy-MM-dd");
     private static final DateTimeFormatter YYYY_MM_DD_HH = DateTimeFormat.forPattern("yyyy-MM-dd HH");
     private static final DateTimeFormatter YYYY_MM_DD_HHMM = DateTimeFormat.forPattern("yyyy-MM-dd HHmm");
@@ -121,11 +119,9 @@ public enum DurationUtils {
                     break;
             }
             i++;
-            if (i > MAX_TIME_SPAN) {
+            if (i > 500) {
                 throw new UnexpectedException(
-                    "Duration data error, the span between the start time and the end time is too large, step: "
-                            + step.name() + ", start: " + startTimeBucket + ", end: " + endTimeBucket
-                            + ", max time span: " + MAX_TIME_SPAN);
+                    "Duration data error, step: " + step.name() + ", start: " + startTimeBucket + ", end: " + endTimeBucket);
             }
         }
         while (endTimeBucket != durations.get(durations.size() - 1).getPoint());