chaijunjie0101 commented on code in PR #2079:
URL: https://github.com/apache/phoenix/pull/2079#discussion_r1997557693
##########
phoenix-core-client/src/main/java/org/apache/phoenix/jdbc/PhoenixStatement.java:
##########
@@ -2614,6 +2614,15 @@ public QueryPlan getQueryPlan() {
@Override
public ResultSet getResultSet() throws SQLException {
ResultSet rs = getLastResultSet();
+ if (!isClosed && rs == null && lastQueryPlan != null) {
Review Comment:
@stoty please review again, thanks.
After I checked, just need set the resultset to lastResult in is enough, i
find the code comments "// newResultset sets lastResultset", but did not set it
in the earler version, and in the
org.apache.phoenix.jdbc.PhoenixStatement#close, will clear it.
I add 2 tests:
1.When using "statement.execute + statement.getResultSet" to test show
create table, could return msg success.
2.When only close statement(not close resultset), colud clear the
lastResultSet of statement, confirm not cause mem leak.
--
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]