Copilot commented on code in PR #7081:
URL: https://github.com/apache/ignite-3/pull/7081#discussion_r2565115038


##########
modules/jdbc/src/main/java/org/apache/ignite/internal/jdbc/ConnectionProperties.java:
##########
@@ -98,6 +98,24 @@ public interface ConnectionProperties {
      */
     void setConnectionTimeout(Integer connTimeout) throws SQLException;
 
+    /**
+     * Gets the background reconnect interval, in milliseconds.
+     *
+     * <p>Value {@code 0} means that background reconnect is disabled.
+     *
+     * <p>Default is {@link 
org.apache.ignite.client.IgniteClientConfiguration#DFLT_BACKGROUND_RECONNECT_INTERVAL}.
+     */
+    long getReconnectInterval();
+
+    /**
+     * Gets the maximum number of retry attempts to establish connection.
+     *
+     *<p>Value {@code 0} means that no retries will be made, {@code -1} means 
that the number of retries is unlimited.
+     *
+     *<p>Default is {@link 
org.apache.ignite.client.RetryLimitPolicy#DFLT_RETRY_LIMIT}.

Review Comment:
   Missing space after `*` in javadoc. Should be ` * <p>` instead of ` *<p>` 
for consistency with the rest of the codebase (see line 104 above).
   ```suggestion
        * <p>Value {@code 0} means that no retries will be made, {@code -1} 
means that the number of retries is unlimited.
        *
        * <p>Default is {@link 
org.apache.ignite.client.RetryLimitPolicy#DFLT_RETRY_LIMIT}.
   ```



##########
modules/jdbc/src/integrationTest/java/org/apache/ignite/jdbc/ItJdbcConnectionFailoverTest.java:
##########
@@ -143,13 +250,19 @@ void testTransactionCannotBeUsedAfterNodeRestart() throws 
SQLException {
         }
     }
 
-    private static Connection getConnection(int nodesCount) throws 
SQLException {
+    private static Connection getConnection(int nodesCount, String ... params) 
throws SQLException {
         String addresses = IntStream.range(0, nodesCount)
                 .mapToObj(i -> "127.0.0.1:" + (BASE_CLIENT_PORT + i))
                 .collect(Collectors.joining(","));
 
+        return getConnection(addresses, params);
+    }
+
+    private static Connection getConnection(String addresses, String ... 
params) throws SQLException {
+        String args = String.join("&", params);
+
         //noinspection CallToDriverManagerGetConnection
-        return DriverManager.getConnection("jdbc:ignite:thin://" + addresses);
+        return DriverManager.getConnection("jdbc:ignite:thin://" + addresses + 
"?" + args);

Review Comment:
   [nitpick] When `params` is empty, the connection string will end with "?" 
(e.g., "jdbc:ignite:thin://127.0.0.1:10800?"). Consider only appending "?" when 
params is non-empty. For example:
   ```java
   String suffix = args.isEmpty() ? "" : "?" + args;
   return DriverManager.getConnection("jdbc:ignite:thin://" + addresses + 
suffix);
   ```
   ```suggestion
           String suffix = args.isEmpty() ? "" : "?" + args;
           return DriverManager.getConnection("jdbc:ignite:thin://" + addresses 
+ suffix);
   ```



-- 
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]

Reply via email to