Skip to content

Commit 9227ada

Browse files
authored
Merge pull request #318 from alex268/master
Increase default closing timeouts
2 parents 22ed47b + 245c03a commit 9227ada

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

core/src/main/java/tech/ydb/core/impl/YdbSchedulerFactory.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,14 @@
99
import org.slf4j.Logger;
1010
import org.slf4j.LoggerFactory;
1111

12+
1213
/**
1314
*
1415
* @author Aleksandr Gorshenin
1516
*/
1617
public class YdbSchedulerFactory {
17-
private static final long WAIT_FOR_SHUTDOWN_MS = 1000;
18+
/** Scheduler waits for closing of channels so this timeout must be greater that GrpcChannel.WAIT_FOR_CLOSING_MS */
19+
private static final long WAIT_FOR_SHUTDOWN_MS = 2 * 5000;
1820

1921
private static final Logger logger = LoggerFactory.getLogger(YdbSchedulerFactory.class);
2022

core/src/main/java/tech/ydb/core/impl/pool/GrpcChannel.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
* @author Nikolay Perfilov
1616
*/
1717
public class GrpcChannel {
18-
private static final long WAIT_FOR_CLOSING_MS = 1000;
18+
/* Channel shutdown waits for finish of active grpc calls, so there must be enough time to complete them all */
19+
private static final long WAIT_FOR_CLOSING_MS = 5000;
1920
private static final Logger logger = LoggerFactory.getLogger(GrpcChannel.class);
2021

2122
private final EndpointRecord endpoint;

0 commit comments

Comments
 (0)