Skip to content

Commit

Permalink
Remove unnecessary componentIds as series ID (#12091)
Browse files Browse the repository at this point in the history
* Remove unnecessary `componentIds` as series ID in the `ServiceRelationClientSideMetrics` and `ServiceRelationServerSideMetrics` entities.
  • Loading branch information
wu-sheng authored Apr 11, 2024
1 parent 5a90121 commit f97fd4f
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
1 change: 1 addition & 0 deletions docs/en/changes/changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
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;

/**
Expand All @@ -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;
Expand Down Expand Up @@ -153,5 +155,11 @@ public StorageID id() {
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();
}

0 comments on commit f97fd4f

Please sign in to comment.