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 f97fd4f6e4 Remove unnecessary `componentIds` as series ID (#12091) f97fd4f6e4 is described below commit f97fd4f6e429e9326893ad57d8aeb9de914653ec Author: 吴晟 Wu Sheng <wu.sh...@foxmail.com> AuthorDate: Thu Apr 11 13:14:06 2024 +0800 Remove unnecessary `componentIds` as series ID (#12091) * Remove unnecessary `componentIds` as series ID 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..40aafacbe4 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` as series ID 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(); }