ptupitsyn commented on code in PR #7261:
URL: https://github.com/apache/ignite-3/pull/7261#discussion_r2629767176
##########
modules/platforms/dotnet/Apache.Ignite/Internal/ClientFailoverSocket.cs:
##########
@@ -470,6 +557,43 @@ private async Task ConnectAllSockets()
}
}
+ private async Task ReResolveDnsPeriodically()
+ {
+ var interval =
Configuration.Configuration.ReResolveAddressesInterval;
+
+ if (interval <= TimeSpan.Zero)
+ {
+ // Re-resolve is disabled.
+ return;
+ }
+
+ while (!_disposed)
+ {
+ await Task.Delay(interval).ConfigureAwait(false);
+ await ReResolveDns().ConfigureAwait(false);
+ }
+ }
+
+ [SuppressMessage(
+ "Microsoft.Design",
+ "CA1031:DoNotCatchGeneralExceptionTypes",
+ Justification = "Re-resolve errors are logged and skipped.")]
+ private async Task ReResolveDns()
+ {
+ try
+ {
+ // Skip if another operation is in progress.
+ await InitEndpointsAsync(lockWaitTimeoutMs:
1).ConfigureAwait(false);
Review Comment:
Please see my comment above (about a separate lock).
--
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]