in mode/cluster/repository/nacos/src/main/java/org/apache/shardingsphere/mode/repository/cluster/nacos/NacosRepository.java [325:337]
private void waitValue(final Collection<KeyValue> keyValues) throws NacosException {
if (!isAvailable(keyValues)) {
long retryIntervalMilliseconds = nacosProps.getValue(NacosPropertyKey.RETRY_INTERVAL_MILLISECONDS);
int maxRetries = nacosProps.getValue(NacosPropertyKey.MAX_RETRIES);
for (int retry = 0; retry < maxRetries; retry++) {
Thread.sleep(getSleepTimeMs(retry, retryIntervalMilliseconds));
if (isAvailable(keyValues)) {
return;
}
}
throw new NacosException(NacosException.RESOURCE_NOT_FOUND, "Wait value availability timeout exceeded");
}
}