swuferhong commented on code in PR #2024:
URL: https://github.com/apache/fluss/pull/2024#discussion_r2564200517
##########
fluss-client/src/main/java/org/apache/fluss/client/metadata/MetadataUpdater.java:
##########
@@ -316,14 +330,54 @@ private static Cluster initializeCluster(Configuration
conf, RpcClient rpcClient
return cluster;
}
- private static Cluster tryToInitializeCluster(RpcClient rpcClient,
InetSocketAddress address)
+ @VisibleForTesting
+ static @Nullable Cluster tryToInitializeClusterWithRetries(
+ InetSocketAddress address, AdminReadOnlyGateway gateway, int
maxRetryTimes)
+ throws Exception {
+ int retryCount = 0;
+ while (retryCount <= maxRetryTimes) {
+ try {
+ return tryToInitializeCluster(gateway);
+ } catch (Exception e) {
Review Comment:
Agreed. I have change this to two separate code paths: the retry logic is
only applied when there is exactly one bootstrap server address.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]