Increase zk connect timeout (#16180)
This commit is contained in:
parent
3f3f0cd4cb
commit
2ab5f7dd54
|
|
@ -82,12 +82,12 @@ registry:
|
|||
namespace: dolphinscheduler
|
||||
connect-string: localhost:2181
|
||||
retry-policy:
|
||||
base-sleep-time: 60ms
|
||||
max-sleep: 300ms
|
||||
base-sleep-time: 1s
|
||||
max-sleep: 3s
|
||||
max-retries: 5
|
||||
session-timeout: 30s
|
||||
connection-timeout: 9s
|
||||
block-until-connected: 600ms
|
||||
session-timeout: 60s
|
||||
connection-timeout: 15s
|
||||
block-until-connected: 15s
|
||||
digest: ~
|
||||
|
||||
metrics:
|
||||
|
|
|
|||
|
|
@ -120,8 +120,8 @@ registry:
|
|||
namespace: dolphinscheduler
|
||||
connect-string: localhost:2181
|
||||
retry-policy:
|
||||
base-sleep-time: 60ms
|
||||
max-sleep: 300ms
|
||||
base-sleep-time: 1s
|
||||
max-sleep: 3s
|
||||
max-retries: 5
|
||||
session-timeout: 60s
|
||||
connection-timeout: 15s
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@ import org.apache.dolphinscheduler.dao.repository.CommandDao;
|
|||
import org.apache.commons.lang3.RandomUtils;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import org.junit.jupiter.api.RepeatedTest;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
|
@ -62,9 +63,9 @@ class CommandDaoImplTest extends BaseDaoTest {
|
|||
// Generate commandSize commands
|
||||
int id = 0;
|
||||
for (int j = 0; j < commandSize; j++) {
|
||||
id += idStep;
|
||||
Command command = generateCommand(CommandType.START_PROCESS, 0);
|
||||
command.setId(id);
|
||||
id += idStep;
|
||||
commandDao.insert(command);
|
||||
}
|
||||
|
||||
|
|
@ -75,7 +76,8 @@ class CommandDaoImplTest extends BaseDaoTest {
|
|||
", idStep: " + idStep +
|
||||
", fetchSize: " + fetchSize +
|
||||
", total command size: " + commandSize +
|
||||
", total commands: " + commandDao.queryAll());
|
||||
", total commands: "
|
||||
+ commandDao.queryAll().stream().map(Command::getId).collect(Collectors.toList()));
|
||||
assertThat(commands.size())
|
||||
.isEqualTo(commandDao.queryAll()
|
||||
.stream()
|
||||
|
|
|
|||
|
|
@ -74,12 +74,12 @@ registry:
|
|||
namespace: dolphinscheduler
|
||||
connect-string: localhost:2181
|
||||
retry-policy:
|
||||
base-sleep-time: 60ms
|
||||
max-sleep: 300ms
|
||||
base-sleep-time: 1s
|
||||
max-sleep: 3s
|
||||
max-retries: 5
|
||||
session-timeout: 30s
|
||||
connection-timeout: 9s
|
||||
block-until-connected: 600ms
|
||||
session-timeout: 60s
|
||||
connection-timeout: 15s
|
||||
block-until-connected: 15s
|
||||
digest: ~
|
||||
|
||||
master:
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ class DelayEntryTest {
|
|||
void getDelay() {
|
||||
DelayEntry<String> delayEntry = new DelayEntry<>(5_000L, "Item");
|
||||
assertThat(delayEntry.getDelay(TimeUnit.NANOSECONDS))
|
||||
.isWithin(500)
|
||||
.isWithin(TimeUnit.NANOSECONDS.convert(500, TimeUnit.MILLISECONDS))
|
||||
.of(TimeUnit.NANOSECONDS.convert(5_000L, TimeUnit.MILLISECONDS));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -101,16 +101,16 @@ class ZookeeperRegistryProperties implements Validator {
|
|||
private String connectString;
|
||||
private RetryPolicy retryPolicy = new RetryPolicy();
|
||||
private String digest;
|
||||
private Duration sessionTimeout = Duration.ofSeconds(30);
|
||||
private Duration connectionTimeout = Duration.ofSeconds(9);
|
||||
private Duration blockUntilConnected = Duration.ofMillis(600);
|
||||
private Duration sessionTimeout = Duration.ofSeconds(60);
|
||||
private Duration connectionTimeout = Duration.ofSeconds(15);
|
||||
private Duration blockUntilConnected = Duration.ofSeconds(15);
|
||||
|
||||
@Data
|
||||
public static final class RetryPolicy {
|
||||
|
||||
private Duration baseSleepTime = Duration.ofMillis(60);
|
||||
private int maxRetries;
|
||||
private Duration maxSleep = Duration.ofMillis(300);
|
||||
private Duration baseSleepTime = Duration.ofSeconds(1);
|
||||
private int maxRetries = 3;
|
||||
private Duration maxSleep = Duration.ofSeconds(3);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -85,12 +85,12 @@ registry:
|
|||
namespace: dolphinscheduler
|
||||
connect-string: localhost:2181
|
||||
retry-policy:
|
||||
base-sleep-time: 60ms
|
||||
max-sleep: 300ms
|
||||
base-sleep-time: 1s
|
||||
max-sleep: 3s
|
||||
max-retries: 5
|
||||
session-timeout: 30s
|
||||
connection-timeout: 9s
|
||||
block-until-connected: 600ms
|
||||
session-timeout: 60s
|
||||
connection-timeout: 15s
|
||||
block-until-connected: 15s
|
||||
digest: ~
|
||||
|
||||
security:
|
||||
|
|
|
|||
|
|
@ -31,12 +31,12 @@ registry:
|
|||
namespace: dolphinscheduler
|
||||
connect-string: localhost:2181
|
||||
retry-policy:
|
||||
base-sleep-time: 60ms
|
||||
max-sleep: 300ms
|
||||
base-sleep-time: 1s
|
||||
max-sleep: 3s
|
||||
max-retries: 5
|
||||
session-timeout: 30s
|
||||
connection-timeout: 9s
|
||||
block-until-connected: 600ms
|
||||
session-timeout: 60s
|
||||
connection-timeout: 15s
|
||||
block-until-connected: 15s
|
||||
digest: ~
|
||||
|
||||
worker:
|
||||
|
|
|
|||
Loading…
Reference in New Issue