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 4c7dbbc57d BanyanDBStorageClient: Add `define(Property property, PropertyStore.Strategy strategy)` API. (#11461) 4c7dbbc57d is described below commit 4c7dbbc57df5a93211fd7ca5047ef780ced557de Author: Wan Kai <wankai...@foxmail.com> AuthorDate: Fri Oct 27 13:39:53 2023 +0800 BanyanDBStorageClient: Add `define(Property property, PropertyStore.Strategy strategy)` API. (#11461) --- docs/en/changes/changes.md | 1 + .../storage/plugin/banyandb/BanyanDBStorageClient.java | 13 +++++++++++++ 2 files changed, 14 insertions(+) diff --git a/docs/en/changes/changes.md b/docs/en/changes/changes.md index a30321c614..668a114909 100644 --- a/docs/en/changes/changes.md +++ b/docs/en/changes/changes.md @@ -29,6 +29,7 @@ * Support collect ZGC memory pool metrics. * Add a component ID for Netty-http (ID=151). * Add a component ID for Fiber (ID=5021). +* BanyanDBStorageClient: Add `define(Property property, PropertyStore.Strategy strategy)` API. #### 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 810cefb181..f5f6eef636 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 @@ -155,6 +155,9 @@ public class BanyanDBStorageClient implements Client, HealthCheckable { } } + /** + * PropertyStore.Strategy is default to {@link PropertyStore.Strategy#MERGE} + */ public void define(Property property) throws IOException { try { this.client.apply(property); @@ -165,6 +168,16 @@ public class BanyanDBStorageClient implements Client, HealthCheckable { } } + public void define(Property property, PropertyStore.Strategy strategy) throws IOException { + try { + this.client.apply(property, strategy); + this.healthChecker.health(); + } catch (BanyanDBException ex) { + healthChecker.unHealth(ex); + throw new IOException("fail to define property", ex); + } + } + public void define(Stream stream) throws IOException { try { this.client.define(stream);