Skip to content

Commit

Permalink
Merge pull request #226 from ydb-platform/release_v2.1.11
Browse files Browse the repository at this point in the history
Release v2.1.11
  • Loading branch information
alex268 authored Jan 30, 2024
2 parents 8b02238 + 489dca3 commit dc49ce1
Show file tree
Hide file tree
Showing 22 changed files with 469 additions and 139 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches:
- master
- develop
- release*
pull_request:
type: [opened, reopened, edited]

Expand Down Expand Up @@ -34,6 +35,7 @@ jobs:
run: mvn $MAVEN_ARGS verify

coverage:
if: github.repository == 'ydb-platform/ydb-java-sdk'
name: Coverage YDB Java SDK
runs-on: ubuntu-latest
needs: build
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 2.1.11 ##

* Transports: Add option withGrpcKeepAliveTime to enable grpc keep-alives
* Table: Fixed creation and altering of dataColumns indexes in createTable/alterTable
* Upgraded version of yc-auth to avoid jackson-databind vulnerability

## 2.1.10 ##

* Topics: Added message metadata support
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Firstly you can import YDB Java BOM to specify correct versions of SDK modules.
<dependency>
<groupId>tech.ydb</groupId>
<artifactId>ydb-sdk-bom</artifactId>
<version>2.1.10</version>
<version>2.1.11</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down
4 changes: 2 additions & 2 deletions bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<modelVersion>4.0.0</modelVersion>

<groupId>tech.ydb</groupId>
<version>2.1.10</version>
<version>2.1.11</version>
<artifactId>ydb-sdk-bom</artifactId>
<name>Java SDK Bill of Materials</name>
<description>Java SDK Bill of Materials (BOM)</description>
Expand All @@ -16,7 +16,7 @@
<properties>
<ydb-auth-api.version>1.0.0</ydb-auth-api.version>
<ydb-proto-api.version>1.5.2</ydb-proto-api.version>
<yc-auth.version>2.1.0</yc-auth.version>
<yc-auth.version>2.1.1</yc-auth.version>
</properties>

<licenses>
Expand Down
2 changes: 1 addition & 1 deletion coordination/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<parent>
<groupId>tech.ydb</groupId>
<artifactId>ydb-sdk-parent</artifactId>
<version>2.1.10</version>
<version>2.1.11</version>
</parent>

<artifactId>ydb-sdk-coordination</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<parent>
<groupId>tech.ydb</groupId>
<artifactId>ydb-sdk-parent</artifactId>
<version>2.1.10</version>
<version>2.1.11</version>
</parent>

<artifactId>ydb-sdk-core</artifactId>
Expand Down
17 changes: 17 additions & 0 deletions core/src/main/java/tech/ydb/core/grpc/GrpcTransportBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ public class GrpcTransportBuilder {
* can cause leaks https://github.com/grpc/grpc-java/issues/9340
*/
private boolean grpcRetry = false;
private Long grpcKeepAliveTimeMillis = null;

GrpcTransportBuilder(@Nullable String endpoint, @Nullable HostAndPort host, @Nonnull String database) {
this.endpoint = endpoint;
Expand Down Expand Up @@ -132,6 +133,10 @@ public boolean isEnableRetry() {
return grpcRetry;
}

public Long getGrpcKeepAliveTimeMillis() {
return grpcKeepAliveTimeMillis;
}

public boolean useDefaultGrpcResolver() {
return useDefaultGrpcResolver;
}
Expand Down Expand Up @@ -236,6 +241,18 @@ public GrpcTransportBuilder withDiscoveryTimeout(long timeout, TimeUnit unit) {
return this;
}

public GrpcTransportBuilder withGrpcKeepAliveTime(Duration time) {
this.grpcKeepAliveTimeMillis = time.toMillis();
Preconditions.checkArgument(grpcKeepAliveTimeMillis > 0, "grpcKeepAliveTime must be greater than 0");
return this;
}

public GrpcTransportBuilder withGrpcKeepAliveTime(long time, TimeUnit unit) {
this.grpcKeepAliveTimeMillis = unit.toMillis(time);
Preconditions.checkArgument(grpcKeepAliveTimeMillis > 0, "grpcKeepAliveTime must be greater than 0");
return this;
}

public GrpcTransportBuilder withCallExecutor(Executor executor) {
this.callExecutor = Objects.requireNonNull(executor);
return this;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package tech.ydb.core.impl.pool;

import java.io.ByteArrayInputStream;
import java.util.concurrent.TimeUnit;
import java.util.function.Consumer;

import javax.net.ssl.SSLException;
Expand Down Expand Up @@ -39,6 +40,7 @@ public class ManagedChannelFactory {
private final boolean retryEnabled;
private final long connectTimeoutMs;
private final boolean useDefaultGrpcResolver;
private final Long grpcKeepAliveTimeMillis;

private ManagedChannelFactory(GrpcTransportBuilder builder) {
this.database = builder.getDatabase();
Expand All @@ -49,6 +51,7 @@ private ManagedChannelFactory(GrpcTransportBuilder builder) {
this.retryEnabled = builder.isEnableRetry();
this.connectTimeoutMs = builder.getConnectTimeoutMillis();
this.useDefaultGrpcResolver = builder.useDefaultGrpcResolver();
this.grpcKeepAliveTimeMillis = builder.getGrpcKeepAliveTimeMillis();
}

public long getConnectTimeoutMs() {
Expand Down Expand Up @@ -80,6 +83,10 @@ public ManagedChannel newManagedChannel(String host, int port) {
.defaultLoadBalancingPolicy(DEFAULT_BALANCER_POLICY);
}

if (grpcKeepAliveTimeMillis != null) {
channelBuilder.keepAliveTime(grpcKeepAliveTimeMillis, TimeUnit.MILLISECONDS);
}

if (channelInitializer != null) {
channelInitializer.accept(channelBuilder);
}
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/resources/version.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version=2.1.10
version=2.1.11
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<groupId>tech.ydb</groupId>
<artifactId>ydb-sdk-parent</artifactId>
<version>2.1.10</version>
<version>2.1.11</version>

<name>Java SDK for YDB</name>
<description>Java SDK for YDB</description>
Expand Down
2 changes: 1 addition & 1 deletion scheme/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<parent>
<groupId>tech.ydb</groupId>
<artifactId>ydb-sdk-parent</artifactId>
<version>2.1.10</version>
<version>2.1.11</version>
</parent>

<artifactId>ydb-sdk-scheme</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion table/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<parent>
<groupId>tech.ydb</groupId>
<artifactId>ydb-sdk-parent</artifactId>
<version>2.1.10</version>
<version>2.1.11</version>
</parent>

<artifactId>ydb-sdk-table</artifactId>
Expand Down
13 changes: 10 additions & 3 deletions table/src/main/java/tech/ydb/table/description/ColumnFamily.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,19 @@ public final class ColumnFamily {
private final String name;
private final StoragePool data;
private final Compression compression;
private final boolean keepInMemory;

@Deprecated
public ColumnFamily(String name, StoragePool data, Compression compression, boolean keepInMemory) {
this.name = name;
this.data = data;
this.compression = compression;
this.keepInMemory = keepInMemory;
// this.keepInMemory = keepInMemory;
}

public ColumnFamily(String name, StoragePool data, Compression compression) {
this.name = name;
this.data = data;
this.compression = compression;
}

public String getName() {
Expand All @@ -25,8 +31,9 @@ public Compression getCompression() {
return compression;
}

@Deprecated
public boolean isKeepInMemory() {
return keepInMemory;
return false;
}

public enum Compression {
Expand Down
Loading

0 comments on commit dc49ce1

Please sign in to comment.