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/04/20 09:17:08 UTC

[skywalking] branch metrics updated: Make H2 works. And fix some bugs.

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

wusheng pushed a commit to branch metrics
in repository https://gitbox.apache.org/repos/asf/skywalking.git


The following commit(s) were added to refs/heads/metrics by this push:
     new b8d617b  Make H2 works. And fix some bugs.
b8d617b is described below

commit b8d617bf9a24c490242bb0f47fd44b87b07539ec
Author: Wu Sheng <wu...@foxmail.com>
AuthorDate: Mon Apr 20 17:16:11 2020 +0800

    Make H2 works. And fix some bugs.
---
 .../org/apache/skywalking/oap/query/graphql/resolver/MetricQuery.java   | 1 +
 .../oap/server/storage/plugin/jdbc/h2/dao/H2MetricsQueryDAO.java        | 2 ++
 skywalking-ui                                                           | 2 +-
 3 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/oap-server/server-query-plugin/query-graphql-plugin/src/main/java/org/apache/skywalking/oap/query/graphql/resolver/MetricQuery.java b/oap-server/server-query-plugin/query-graphql-plugin/src/main/java/org/apache/skywalking/oap/query/graphql/resolver/MetricQuery.java
index 50a26b3..4f293f7 100644
--- a/oap-server/server-query-plugin/query-graphql-plugin/src/main/java/org/apache/skywalking/oap/query/graphql/resolver/MetricQuery.java
+++ b/oap-server/server-query-plugin/query-graphql-plugin/src/main/java/org/apache/skywalking/oap/query/graphql/resolver/MetricQuery.java
@@ -68,6 +68,7 @@ public class MetricQuery implements GraphQLQueryResolver {
                 condition.setEntity(new MockEntity(id));
 
                 kv.setValue(query.readMetricsValue(condition, duration));
+                values.addKVInt(kv);
             }
         }
 
diff --git a/oap-server/server-storage-plugin/storage-jdbc-hikaricp-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/jdbc/h2/dao/H2MetricsQueryDAO.java b/oap-server/server-storage-plugin/storage-jdbc-hikaricp-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/jdbc/h2/dao/H2MetricsQueryDAO.java
index fb752bc..db5cbfd 100644
--- a/oap-server/server-storage-plugin/storage-jdbc-hikaricp-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/jdbc/h2/dao/H2MetricsQueryDAO.java
+++ b/oap-server/server-storage-plugin/storage-jdbc-hikaricp-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/jdbc/h2/dao/H2MetricsQueryDAO.java
@@ -70,6 +70,8 @@ public class H2MetricsQueryDAO extends H2SQLExecutor implements IMetricsQueryDAO
             parameters.add(entityId);
         }
         sql.append(Metrics.TIME_BUCKET + ">= ? and " + Metrics.TIME_BUCKET + "<=?" + " group by " + Metrics.ENTITY_ID);
+        parameters.add(duration.getStartTimeBucket());
+        parameters.add(duration.getEndTimeBucket());
 
         try (Connection connection = h2Client.getConnection()) {
             try (ResultSet resultSet = h2Client.executeQuery(
diff --git a/skywalking-ui b/skywalking-ui
index 905b896..52a56d3 160000
--- a/skywalking-ui
+++ b/skywalking-ui
@@ -1 +1 @@
-Subproject commit 905b89687a74a306e89f3fbafe43dd3d7ff80eaf
+Subproject commit 52a56d3ee273a3629d3ac48ba7eb99d8ba694ca9