File tree Expand file tree Collapse file tree 4 files changed +13
-24
lines changed
java/org/apache/skywalking/banyandb/v1/client Expand file tree Collapse file tree 4 files changed +13
-24
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,8 @@ Release Notes.
1010* Bump up the API to support sharding_key.
1111* Bump up the API to support version 0.9.
1212* Support stage query on TopN.
13+ * Add replicas configuration to the API: introduce ` replicas ` in LifecycleStage and ResourceOpts to support high availability.
14+ * Simplify TLS options: remove unsupported mTLS client certificate settings from Options and DefaultChannelFactory; trust CA is still supported.
1315
14160.8.0
1517------------------
Original file line number Diff line number Diff line change @@ -55,14 +55,6 @@ public class Options {
5555 * SSL: Trusted CA Path
5656 */
5757 private String sslTrustCAPath = "" ;
58- /**
59- * SSL: Cert Chain Path, BanyanDB server not support mTLS yet
60- */
61- private String sslCertChainPath = "" ;
62- /**
63- * SSL: Cert Key Path, BanyanDB server not support mTLS yet
64- */
65- private String sslKeyPath = "" ;
6658
6759 public Options () {
6860 }
Original file line number Diff line number Diff line change @@ -56,22 +56,6 @@ public ManagedChannel create() throws IOException {
5656 SslContextBuilder builder = GrpcSslContexts .forClient ();
5757
5858 if (isCAFileExist ) {
59- String certPath = options .getSslCertChainPath ();
60- String keyPath = options .getSslKeyPath ();
61- if (!Strings .isNullOrEmpty (certPath ) && Strings .isNullOrEmpty (keyPath )) {
62- File keyFile = new File (keyPath );
63- File certFile = new File (certPath );
64-
65- if (certFile .isFile () && keyFile .isFile ()) {
66- try (InputStream cert = new FileInputStream (certFile );
67- InputStream key = PrivateKeyUtil .loadDecryptionKey (keyFile .getAbsolutePath ())) {
68- builder .keyManager (cert , key );
69- }
70- } else if (!certFile .isFile () || !keyFile .isFile ()) {
71- log .warn ("Failed to enable mTLS caused by cert or key cannot be found." );
72- }
73- }
74-
7559 builder .trustManager (caFile );
7660 }
7761 managedChannelBuilder .negotiationType (NegotiationType .TLS ).sslContext (builder .build ());
Original file line number Diff line number Diff line change @@ -81,6 +81,12 @@ message LifecycleStage {
8181
8282 // Indicates whether segments that are no longer live should be closed.
8383 bool close = 6 ;
84+
85+ // replicas is the number of replicas for this stage.
86+ // This is an optional field and defaults to 0.
87+ // A value of 0 means no replicas, while a value of 1 means one primary shard and one replica.
88+ // Higher values indicate more replicas.
89+ uint32 replicas = 7 ;
8490}
8591
8692message ResourceOpts {
@@ -94,6 +100,11 @@ message ResourceOpts {
94100 repeated LifecycleStage stages = 4 ;
95101 // default_stages is the name of the default stage
96102 repeated string default_stages = 5 ;
103+ // replicas is the number of replicas. This is used to ensure high availability and fault tolerance.
104+ // This is an optional field and defaults to 0.
105+ // A value of 0 means no replicas, while a value of 1 means one primary shard and one replica.
106+ // Higher values indicate more replicas.
107+ uint32 replicas = 6 ;
97108}
98109
99110// Group is an internal object for Group management
You can’t perform that action at this time.
0 commit comments