You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by ta...@apache.org on 2021/08/24 03:32:10 UTC

[skywalking] branch fix_browser_nodetype created (now 72442eb)

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

tanjian pushed a change to branch fix_browser_nodetype
in repository https://gitbox.apache.org/repos/asf/skywalking.git.


      at 72442eb  fix h2 and influxdb

This branch includes the following new commits:

     new 3754d0f  fix node type(browser) not queried in API.
     new 72442eb  fix h2 and influxdb

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


[skywalking] 01/02: fix node type(browser) not queried in API.

Posted by ta...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 3754d0fe61c7fff299806bc5ce0ff5f379c8ca19
Author: JaredTan95 <ji...@daocloud.io>
AuthorDate: Tue Aug 24 10:58:40 2021 +0800

    fix node type(browser) not queried in API.
---
 .../server/storage/plugin/elasticsearch/query/MetadataQueryEsDAO.java  | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/oap-server/server-storage-plugin/storage-elasticsearch-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/elasticsearch/query/MetadataQueryEsDAO.java b/oap-server/server-storage-plugin/storage-elasticsearch-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/elasticsearch/query/MetadataQueryEsDAO.java
index 8464d3b..f1c8811 100644
--- a/oap-server/server-storage-plugin/storage-elasticsearch-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/elasticsearch/query/MetadataQueryEsDAO.java
+++ b/oap-server/server-storage-plugin/storage-elasticsearch-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/elasticsearch/query/MetadataQueryEsDAO.java
@@ -63,7 +63,8 @@ public class MetadataQueryEsDAO extends EsDAO implements IMetadataQueryDAO {
         SearchSourceBuilder sourceBuilder = SearchSourceBuilder.searchSource();
 
         BoolQueryBuilder boolQueryBuilder = QueryBuilders.boolQuery();
-        boolQueryBuilder.must().add(QueryBuilders.termQuery(ServiceTraffic.NODE_TYPE, NodeType.Normal.value()));
+        boolQueryBuilder.should().add(QueryBuilders.termQuery(ServiceTraffic.NODE_TYPE, NodeType.Normal.value()));
+        boolQueryBuilder.should().add(QueryBuilders.termQuery(ServiceTraffic.NODE_TYPE, NodeType.Browser.value()));
         if (StringUtil.isNotEmpty(group)) {
             boolQueryBuilder.must().add(QueryBuilders.termQuery(ServiceTraffic.GROUP, group));
         }

[skywalking] 02/02: fix h2 and influxdb

Posted by ta...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 72442eb9a7cb65b030b52fdffc52c76e672bda6f
Author: JaredTan95 <ji...@daocloud.io>
AuthorDate: Tue Aug 24 11:24:32 2021 +0800

    fix h2 and influxdb
---
 .../oap/server/storage/plugin/influxdb/query/MetadataQuery.java        | 3 ++-
 .../oap/server/storage/plugin/jdbc/h2/dao/H2MetadataQueryDAO.java      | 2 ++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/oap-server/server-storage-plugin/storage-influxdb-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/influxdb/query/MetadataQuery.java b/oap-server/server-storage-plugin/storage-influxdb-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/influxdb/query/MetadataQuery.java
index d54620b..b7b3563 100644
--- a/oap-server/server-storage-plugin/storage-influxdb-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/influxdb/query/MetadataQuery.java
+++ b/oap-server/server-storage-plugin/storage-influxdb-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/influxdb/query/MetadataQuery.java
@@ -71,7 +71,8 @@ public class MetadataQuery implements IMetadataQueryDAO {
         final WhereQueryImpl<SelectQueryImpl> where = select(
             ID_COLUMN, NAME, ServiceTraffic.GROUP)
             .from(client.getDatabase(), ServiceTraffic.INDEX_NAME)
-            .where(eq(TagName.NODE_TYPE, String.valueOf(NodeType.Normal.value())));
+            .where(eq(TagName.NODE_TYPE, String.valueOf(NodeType.Normal.value())))
+            .or(eq(TagName.NODE_TYPE, String.valueOf(NodeType.Browser.value())));
         if (StringUtil.isNotEmpty(group)) {
             where.and(eq(TagName.SERVICE_GROUP, group));
         }
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/H2MetadataQueryDAO.java b/oap-server/server-storage-plugin/storage-jdbc-hikaricp-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/jdbc/h2/dao/H2MetadataQueryDAO.java
index 87c2d91..d204a0f 100644
--- a/oap-server/server-storage-plugin/storage-jdbc-hikaricp-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/jdbc/h2/dao/H2MetadataQueryDAO.java
+++ b/oap-server/server-storage-plugin/storage-jdbc-hikaricp-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/jdbc/h2/dao/H2MetadataQueryDAO.java
@@ -62,6 +62,8 @@ public class H2MetadataQueryDAO implements IMetadataQueryDAO {
         sql.append("select * from ").append(ServiceTraffic.INDEX_NAME).append(" where ");
         sql.append(ServiceTraffic.NODE_TYPE).append("=?");
         condition.add(NodeType.Normal.value());
+        sql.append(" or ").append(ServiceTraffic.NODE_TYPE).append("=?");
+        condition.add(NodeType.Browser.value());
         if (StringUtil.isNotEmpty(group)) {
             sql.append(" and ").append(ServiceTraffic.GROUP).append("=?");
             condition.add(group);