From 245c03a5b7684f3d1fca4e4c72a835f3bf9e534a Mon Sep 17 00:00:00 2001 From: Alexandr Gorshenin Date: Tue, 24 Sep 2024 10:23:36 +0100 Subject: [PATCH] Increase default closing timeouts --- .../src/main/java/tech/ydb/core/impl/YdbSchedulerFactory.java | 4 +++- core/src/main/java/tech/ydb/core/impl/pool/GrpcChannel.java | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/tech/ydb/core/impl/YdbSchedulerFactory.java b/core/src/main/java/tech/ydb/core/impl/YdbSchedulerFactory.java index f38f4b596..36d2a594a 100644 --- a/core/src/main/java/tech/ydb/core/impl/YdbSchedulerFactory.java +++ b/core/src/main/java/tech/ydb/core/impl/YdbSchedulerFactory.java @@ -9,12 +9,14 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; + /** * * @author Aleksandr Gorshenin */ public class YdbSchedulerFactory { - private static final long WAIT_FOR_SHUTDOWN_MS = 1000; + /** Scheduler waits for closing of channels so this timeout must be greater that GrpcChannel.WAIT_FOR_CLOSING_MS */ + private static final long WAIT_FOR_SHUTDOWN_MS = 2 * 5000; private static final Logger logger = LoggerFactory.getLogger(YdbSchedulerFactory.class); diff --git a/core/src/main/java/tech/ydb/core/impl/pool/GrpcChannel.java b/core/src/main/java/tech/ydb/core/impl/pool/GrpcChannel.java index bdee43f27..03547670d 100644 --- a/core/src/main/java/tech/ydb/core/impl/pool/GrpcChannel.java +++ b/core/src/main/java/tech/ydb/core/impl/pool/GrpcChannel.java @@ -15,7 +15,8 @@ * @author Nikolay Perfilov */ public class GrpcChannel { - private static final long WAIT_FOR_CLOSING_MS = 1000; + /* Channel shutdown waits for finish of active grpc calls, so there must be enough time to complete them all */ + private static final long WAIT_FOR_CLOSING_MS = 5000; private static final Logger logger = LoggerFactory.getLogger(GrpcChannel.class); private final EndpointRecord endpoint;