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 2024/04/11 04:45:18 UTC
(skywalking) 01/01: Remove unnecessary `componentIds` in the `ServiceRelationClientSideMetrics` and `ServiceRelationServerSideMetrics` entities.
This is an automated email from the ASF dual-hosted git repository.
wusheng pushed a commit to branch polish-banyandb
in repository https://gitbox.apache.org/repos/asf/skywalking.git
commit 07d29de7dcac1b27641202d6fd1f0e131623ce8b
Author: Wu Sheng <wu...@foxmail.com>
AuthorDate: Thu Apr 11 12:45:10 2024 +0800
Remove unnecessary `componentIds` in the `ServiceRelationClientSideMetrics` and `ServiceRelationServerSideMetrics` entities.
---
docs/en/changes/changes.md | 1 +
.../relation/service/ServiceRelationClientSideMetrics.java | 1 -
.../relation/service/ServiceRelationServerSideMetrics.java | 1 -
.../skywalking/oap/server/core/analysis/metrics/Metrics.java | 10 +++++++++-
4 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/docs/en/changes/changes.md b/docs/en/changes/changes.md
index e6d1d8a211..2c6473c05f 100644
--- a/docs/en/changes/changes.md
+++ b/docs/en/changes/changes.md
@@ -95,6 +95,7 @@
- Deprecate `percentile` function and introduce `percentile2` function instead.
* Bump up Kafka to fix CVE.
* Fix `NullPointerException` in Istio ServiceEntry registry.
+* Remove unnecessary `componentIds` in the `ServiceRelationClientSideMetrics` and `ServiceRelationServerSideMetrics` entities.
#### UI
diff --git a/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/manual/relation/service/ServiceRelationClientSideMetrics.java b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/manual/relation/service/ServiceRelationClientSideMetrics.java
index 33126db2de..9911fd1fff 100644
--- a/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/manual/relation/service/ServiceRelationClientSideMetrics.java
+++ b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/manual/relation/service/ServiceRelationClientSideMetrics.java
@@ -59,7 +59,6 @@ public class ServiceRelationClientSideMetrics extends Metrics {
@Getter
@Column(name = COMPONENT_IDS, storageOnly = true)
@ElasticSearch.Keyword
- @BanyanDB.SeriesID(index = 1)
private IntList componentIds = new IntList(3);
@Setter
@Getter
diff --git a/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/manual/relation/service/ServiceRelationServerSideMetrics.java b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/manual/relation/service/ServiceRelationServerSideMetrics.java
index 6d0ecb6acf..a252d326d2 100644
--- a/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/manual/relation/service/ServiceRelationServerSideMetrics.java
+++ b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/manual/relation/service/ServiceRelationServerSideMetrics.java
@@ -61,7 +61,6 @@ public class ServiceRelationServerSideMetrics extends Metrics {
@Getter
@Column(name = COMPONENT_IDS, storageOnly = true)
@ElasticSearch.Keyword
- @BanyanDB.SeriesID(index = 1)
private IntList componentIds = new IntList(3);
@Setter
@Getter
diff --git a/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/metrics/Metrics.java b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/metrics/Metrics.java
index 79840056a2..6259fda365 100644
--- a/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/metrics/Metrics.java
+++ b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/metrics/Metrics.java
@@ -25,6 +25,7 @@ import org.apache.skywalking.oap.server.core.analysis.TimeBucket;
import org.apache.skywalking.oap.server.core.remote.data.StreamData;
import org.apache.skywalking.oap.server.core.storage.StorageData;
import org.apache.skywalking.oap.server.core.storage.StorageID;
+import org.apache.skywalking.oap.server.core.storage.annotation.BanyanDB;
import org.apache.skywalking.oap.server.core.storage.annotation.Column;
/**
@@ -48,7 +49,8 @@ public abstract class Metrics extends StreamData implements StorageData {
/**
* The last update timestamp of the cache.
- * The `update` means it is combined with the new metrics. This update doesn't mean the database level update ultimately.
+ * The `update` means it is combined with the new metrics. This update doesn't mean the database level update
+ * ultimately.
*/
@Getter
private long lastUpdateTimestamp = 0L;
@@ -153,5 +155,11 @@ public abstract class Metrics extends StreamData implements StorageData {
return id;
}
+ /**
+ * @return {@link StorageID} of this metrics to represent the unique identity in storage.
+ * This ID doesn't have to match the physical storage primary key.
+ * The storage could pick another way to indicate the unique identity, such as BanyanDB is using
+ * {@link BanyanDB.SeriesID}
+ */
protected abstract StorageID id0();
}