tkhurana commented on code in PR #2293:
URL: https://github.com/apache/phoenix/pull/2293#discussion_r2402847149
##########
phoenix-core-client/src/main/java/org/apache/phoenix/jdbc/ParallelPhoenixResultSet.java:
##########
@@ -147,6 +153,24 @@ public void resetMetrics() {
context.resetMetrics();
}
+ /**
+ * Closes the idle result set to release server resources immediately. This
is called after we've
+ * bound to the winning result set.
+ */
+ private void closeIdleResultSet(CompletableFuture<ResultSet> idleFuture) {
+ idleFuture.whenComplete((resultSet, throwable) -> {
+ if (throwable == null && resultSet != null) {
+ try {
+ if (!resultSet.isClosed()) {
Review Comment:
I think this check is redundant. The `close()` is a no-op if it is already
closed.
--
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]