Skip to content

Commit 982f280

Browse files
authored
Merge pull request #393 from alex268/topic_fixes
Topic fixes
2 parents 765365c + e314dad commit 982f280

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

topic/src/main/java/tech/ydb/topic/impl/GrpcStreamRetrier.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,11 @@ private void tryScheduleReconnect() {
9292
}
9393

9494
void reconnect() {
95+
if (isStopped.get()) {
96+
getLogger().info("[{}] {} is already stopped, no need to reconnect", id, getStreamName());
97+
return;
98+
}
99+
95100
getLogger().info("[{}] {} reconnect #{} started", id, getStreamName(), reconnectCounter.get());
96101
if (!isReconnecting.compareAndSet(true, false)) {
97102
getLogger().warn("Couldn't reset reconnect flag. Shouldn't happen");

topic/src/main/java/tech/ydb/topic/impl/TopicClientImpl.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ private GrpcRequestSettings makeGrpcRequestSettings(BaseRequestSettings settings
8989
}
9090

9191
@Override
92+
@SuppressWarnings("deprecation")
9293
public CompletableFuture<Status> createTopic(String path, CreateTopicSettings settings) {
9394
YdbTopic.CreateTopicRequest.Builder requestBuilder = YdbTopic.CreateTopicRequest.newBuilder()
9495
.setOperationParams(Operation.buildParams(settings))
@@ -125,6 +126,7 @@ public CompletableFuture<Status> createTopic(String path, CreateTopicSettings se
125126
}
126127

127128
@Override
129+
@SuppressWarnings("deprecation")
128130
public CompletableFuture<Status> alterTopic(String path, AlterTopicSettings settings) {
129131
YdbTopic.AlterTopicRequest.Builder requestBuilder = YdbTopic.AlterTopicRequest.newBuilder()
130132
.setOperationParams(Operation.buildParams(settings))
@@ -257,6 +259,7 @@ public CompletableFuture<Result<ConsumerDescription>> describeConsumer(
257259
.thenApply(result -> result.map(ConsumerDescription::new));
258260
}
259261

262+
@SuppressWarnings("deprecation")
260263
private TopicDescription mapDescribeTopic(YdbTopic.DescribeTopicResult result) {
261264
if (logger.isTraceEnabled()) {
262265
logger.trace("Received topic describe response:\n{}", result);

0 commit comments

Comments
 (0)