This is an automated email from the ASF dual-hosted git repository.
wankai 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 ba771097f1 Wrap `deleteProperty` API to the BanyanDBStorageClient.
(#10971)
ba771097f1 is described below
commit ba771097f185f6e329bdaab0287fe918c30b8719
Author: Wan Kai <[email protected]>
AuthorDate: Tue Jun 20 23:12:26 2023 +0800
Wrap `deleteProperty` API to the BanyanDBStorageClient. (#10971)
---
docs/en/changes/changes.md | 1 +
.../storage/plugin/banyandb/BanyanDBStorageClient.java | 12 ++++++++++++
2 files changed, 13 insertions(+)
diff --git a/docs/en/changes/changes.md b/docs/en/changes/changes.md
index aa76893093..5d900a14fc 100644
--- a/docs/en/changes/changes.md
+++ b/docs/en/changes/changes.md
@@ -9,6 +9,7 @@
* Add Neo4j component ID(112) language: Python.
* Add Istio ServiceEntry registry to resolve unknown IPs in ALS.
* Improve Kubernetes coordinator to only select ready OAP Pods to build
cluster.
+* Wrap `deleteProperty` API to the BanyanDBStorageClient.
#### UI
diff --git
a/oap-server/server-storage-plugin/storage-banyandb-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/banyandb/BanyanDBStorageClient.java
b/oap-server/server-storage-plugin/storage-banyandb-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/banyandb/BanyanDBStorageClient.java
index 81c2b0c0e0..bb242a19ee 100644
---
a/oap-server/server-storage-plugin/storage-banyandb-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/banyandb/BanyanDBStorageClient.java
+++
b/oap-server/server-storage-plugin/storage-banyandb-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/banyandb/BanyanDBStorageClient.java
@@ -34,6 +34,7 @@ import
org.apache.skywalking.banyandb.v1.client.grpc.exception.BanyanDBException
import org.apache.skywalking.banyandb.v1.client.metadata.Group;
import org.apache.skywalking.banyandb.v1.client.metadata.Measure;
import org.apache.skywalking.banyandb.v1.client.metadata.Property;
+import org.apache.skywalking.banyandb.v1.client.metadata.PropertyStore;
import org.apache.skywalking.banyandb.v1.client.metadata.Stream;
import org.apache.skywalking.banyandb.v1.client.metadata.TopNAggregation;
import org.apache.skywalking.oap.server.library.client.Client;
@@ -99,6 +100,17 @@ public class BanyanDBStorageClient implements Client,
HealthCheckable {
}
}
+ public PropertyStore.DeleteResult deleteProperty(String group, String
name, String id, String... tags) throws IOException {
+ try {
+ PropertyStore.DeleteResult result =
this.client.deleteProperty(group, name, id, tags);
+ this.healthChecker.health();
+ return result;
+ } catch (BanyanDBException ex) {
+ healthChecker.unHealth(ex);
+ throw new IOException("fail to delete property", ex);
+ }
+ }
+
public StreamQueryResponse query(StreamQuery q) throws IOException {
try {
StreamQueryResponse response = this.client.query(q);