lowka commented on code in PR #6806:
URL: https://github.com/apache/ignite-3/pull/6806#discussion_r2452229968


##########
modules/jdbc/src/main/java/org/apache/ignite/internal/jdbc2/JdbcStatement2.java:
##########
@@ -428,16 +423,23 @@ public boolean execute(String sql, String[] colNames) 
throws SQLException {
     public @Nullable ResultSet getResultSet() throws SQLException {
         ensureNotClosed();
 
-        return isQuery() ? resultSet : null;
+        ResultSetWrapper rs = result;
+        if (rs == null) {
+            return null;
+        } else if (rs.isQuery()) {
+            return rs.current();
+        } else {
+            return null;
+        }

Review Comment:
   Thanks. Fixed.



##########
modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/sql/ClientSqlCursorCloseRequest.java:
##########
@@ -40,8 +42,13 @@ public static CompletableFuture<ResponseWriter> process(
     ) throws IgniteInternalCheckedException {
         long resourceId = in.unpackLong();
 
-        ClientSqlResultSet asyncResultSet = 
resources.remove(resourceId).get(ClientSqlResultSet.class);
+        try {
+            ClientSqlResultSet asyncResultSet = 
resources.remove(resourceId).get(ClientSqlResultSet.class);
 
-        return asyncResultSet.closeAsync().thenApply(v -> null);
+            return asyncResultSet.closeAsync().thenApply(v -> null);
+        } catch (IgniteInternalCheckedException | IgniteInternalException 
ignored) {
+            // Ignore: either resource already removed, or registry is closing.
+            return CompletableFutures.nullCompletedFuture();

Review Comment:
   Removed.



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