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

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


The following commit(s) were added to refs/heads/master by this push:
     new 51132976a5 Update the way to count the process (#8980)
51132976a5 is described below

commit 51132976a5cf773864a2619071beaa7bec90f301
Author: mrproliu <[email protected]>
AuthorDate: Mon May 2 23:33:07 2022 +0800

    Update the way to count the process (#8980)
---
 .../oap/server/storage/plugin/influxdb/query/MetadataQuery.java         | 2 +-
 .../oap/server/storage/plugin/iotdb/query/IoTDBMetadataQueryDAO.java    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

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 3eddf43fd9..6770d0df85 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
@@ -175,7 +175,7 @@ public class MetadataQuery implements IMetadataQueryDAO {
     @Override
     public long getProcessesCount(String serviceId, String instanceId, String 
agentId, final ProfilingSupportStatus profilingSupportStatus,
                                   final long lastPingStartTimeBucket, final 
long lastPingEndTimeBucket) throws IOException {
-        final SelectQueryImpl query = 
select().count(ProcessTraffic.PROPERTIES).from(client.getDatabase(), 
ProcessTraffic.INDEX_NAME);
+        final SelectQueryImpl query = 
select().count(ID_COLUMN).from(client.getDatabase(), ProcessTraffic.INDEX_NAME);
         appendProcessWhereQuery(query, serviceId, instanceId, agentId, 
profilingSupportStatus,
                 lastPingStartTimeBucket, lastPingEndTimeBucket);
 
diff --git 
a/oap-server/server-storage-plugin/storage-iotdb-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/iotdb/query/IoTDBMetadataQueryDAO.java
 
b/oap-server/server-storage-plugin/storage-iotdb-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/iotdb/query/IoTDBMetadataQueryDAO.java
index a1ed057240..bac26ec24a 100644
--- 
a/oap-server/server-storage-plugin/storage-iotdb-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/iotdb/query/IoTDBMetadataQueryDAO.java
+++ 
b/oap-server/server-storage-plugin/storage-iotdb-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/iotdb/query/IoTDBMetadataQueryDAO.java
@@ -180,7 +180,7 @@ public class IoTDBMetadataQueryDAO implements 
IMetadataQueryDAO {
                                   final ProfilingSupportStatus 
profilingSupportStatus, final long lastPingStartTimeBucket,
                                   final long lastPingEndTimeBucket) throws 
IOException {
         StringBuilder query = new StringBuilder();
-        query.append("select count(" + ProcessTraffic.PROPERTIES + ") from ");
+        query.append("select count(*) from ");
         appendProcessFromQuery(query, serviceId, instanceId, agentId, 
profilingSupportStatus,
                 lastPingStartTimeBucket, lastPingEndTimeBucket);
 

Reply via email to