Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions jdbc/spring-flyway-app/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
<properties>
<maven.compiler.release>17</maven.compiler.release>
<kotlin.version>1.9.22</kotlin.version>
<hibernate.ydb.dialect.version>0.9.2</hibernate.ydb.dialect.version>
<hibernate.ydb.dialect.version>1.5.2</hibernate.ydb.dialect.version>
<spring.boot.version>3.2.1</spring.boot.version>
<flyway.ydb.dialect.version>1.0.0-RC0</flyway.ydb.dialect.version>
<flyway.core.version>10.7.1</flyway.core.version>
<flyway.ydb.dialect.version>1.0.0</flyway.ydb.dialect.version>
<flyway.core.version>11.20.3</flyway.core.version>
</properties>
<dependencies>
<dependency>
Expand Down Expand Up @@ -56,7 +56,7 @@
<dependency>
<groupId>org.flywaydb</groupId>
<artifactId>flyway-core</artifactId>
<version>10.7.1</version>
<version>${flyway.core.version}</version>
</dependency>

<dependency>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<log4j.version>2.22.1</log4j.version>
<jcommander.version>1.82</jcommander.version>

<ydb.sdk.version>2.3.18</ydb.sdk.version>
<ydb.sdk.version>2.4.6</ydb.sdk.version>
</properties>

<modules>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,17 @@ protected void run(GrpcTransport transport, String pathPrefix) {
.getValue();

System.out.println("--[self]---------------------------");
System.out.println(result1.getSelf());
System.out.println(result1.getEntry());
System.out.println("-----------------------------------");

ListDirectoryResult result2 = schemeClient.listDirectory(directoryPath)
.join()
.getValue();

System.out.println("--[self]---------------------------");
System.out.println(result2.getSelf());
System.out.println(result2.getEntry());
System.out.println("--[children]-----------------------");
System.out.println(result2.getChildren());
System.out.println(result2.getEntryChildren());
System.out.println("-----------------------------------");

for (int i = 0; i < 3; i++) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ protected void run(GrpcTransport transport) {
.build())
.setPartitioningSettings(PartitioningSettings.newBuilder()
.setMinActivePartitions(4)
.setPartitionCountLimit(10)
.setMaxActivePartitions(10)
.build())
.setPartitionWriteSpeedBytesPerSecond(2 * 1024 * 1024) // 2 MB
.setPartitionWriteBurstBytes(4 * 1024 * 1024) // 4 MB
Expand All @@ -76,8 +76,7 @@ protected void run(GrpcTransport transport) {
TopicDescription description = describeTopic(TOPIC_NAME, topicClient);

assert description.getPartitioningSettings().getMinActivePartitions() == 4;
// getPartitionCountLimit is temporally ignored by server
assert description.getPartitioningSettings().getPartitionCountLimit() == 0;
assert description.getPartitioningSettings().getMaxActivePartitions() == 10;
assert description.getPartitionWriteSpeedBytesPerSecond() == 2 * 1024 * 1024;
assert description.getPartitionWriteBurstBytes() == 4 * 1024 * 1024;
assert description.getConsumers().size() == 2;
Expand All @@ -94,6 +93,7 @@ protected void run(GrpcTransport transport) {
.build())
.setAlterPartitioningSettings(AlterPartitioningSettings.newBuilder()
.setMinActivePartitions(6)
.setMaxActivePartitions(6)
.build())
.setPartitionWriteSpeedBytesPerSecond(4 * 1024 * 1024)
.build())
Expand All @@ -106,8 +106,7 @@ protected void run(GrpcTransport transport) {
TopicDescription description = describeTopic(TOPIC_NAME, topicClient);

assert description.getPartitioningSettings().getMinActivePartitions() == 6;
// getPartitionCountLimit is temporally ignored by server
assert description.getPartitioningSettings().getPartitionCountLimit() == 0;
assert description.getPartitioningSettings().getMaxActivePartitions() == 6;
assert description.getPartitionWriteSpeedBytesPerSecond() == 4 * 1024 * 1024;
assert description.getPartitionWriteBurstBytes() == 4 * 1024 * 1024;
assert description.getConsumers().size() == 2;
Expand All @@ -123,7 +122,7 @@ protected void run(GrpcTransport transport) {

topicClient.alterTopic(TOPIC_NAME, AlterTopicSettings.newBuilder()
.setAlterPartitioningSettings(AlterPartitioningSettings.newBuilder()
.setPartitionCountLimit(8)
.setMaxActivePartitions(8)
.build())
.setRetentionPeriod(Duration.ofHours(13))
.setRetentionStorageMb(512)
Expand Down Expand Up @@ -159,8 +158,7 @@ protected void run(GrpcTransport transport) {
TopicDescription description = describeTopic(TOPIC_NAME, topicClient);

assert description.getPartitioningSettings().getMinActivePartitions() == 6;
// getPartitionCountLimit is temporally ignored by server
assert description.getPartitioningSettings().getPartitionCountLimit() == 0;
assert description.getPartitioningSettings().getMaxActivePartitions() == 8;
assert Objects.equals(description.getRetentionPeriod(), Duration.ofHours(13));
assert description.getRetentionStorageMb() == 512;
assert description.getPartitionWriteSpeedBytesPerSecond() == 4 * 1024 * 1024;
Expand Down Expand Up @@ -216,7 +214,7 @@ public TopicDescription describeTopic(String topicPath, TopicClient topicClient)
.append(" ActivePartitions: ").append(description.getPartitioningSettings().getMinActivePartitions())
.append("\n")
.append(" PartitionCountLimit: ").append(description.getPartitioningSettings()
.getPartitionCountLimit()).append("\n")
.getMaxActivePartitions()).append("\n")
.append("getPartitionWriteSpeedBytesPerSecond: ")
.append(description.getPartitionWriteSpeedBytesPerSecond()).append("\n")
.append("getPartitionWriteBurstBytes: ").append(description.getPartitionWriteBurstBytes())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import tech.ydb.common.transaction.TxMode;
import tech.ydb.core.Result;
import tech.ydb.core.Status;
Expand All @@ -20,8 +21,8 @@
import tech.ydb.topic.read.AsyncReader;
import tech.ydb.topic.read.Message;
import tech.ydb.topic.read.PartitionSession;
import tech.ydb.topic.read.events.DataReceivedEvent;
import tech.ydb.topic.read.events.AbstractReadEventHandler;
import tech.ydb.topic.read.events.DataReceivedEvent;
import tech.ydb.topic.read.events.PartitionSessionClosedEvent;
import tech.ydb.topic.read.events.ReaderClosedEvent;
import tech.ydb.topic.read.events.StartPartitionSessionEvent;
Expand Down Expand Up @@ -80,6 +81,7 @@ public void onMessages(DataReceivedEvent event) {
.join().getValue();

// Update offsets in transaction
@SuppressWarnings("deprecation")
Status updateStatus = reader.updateOffsetsInTransaction(transaction, message.getPartitionOffsets(),
new UpdateOffsetsInTransactionSettings.Builder().build())
// Do not commit transaction without waiting for updateOffsetsInTransaction result
Expand Down
Loading