[fix](regression) Avoid prepared Arrow JDBC path in remote IP auth test#64024
Merged
morrySnow merged 1 commit intoJun 3, 2026
Merged
Conversation
### What problem does this PR solve?
Issue Number: None
Related PR: None
Problem Summary: test_auth_remote_ip only needs to verify that Arrow Flight SQL remote IP authentication allows SELECT 1 for the matched host. The shared sql_impl helper uses PreparedStatement, and Arrow Flight SQL JDBC 17 can report a close-time 8-byte client allocator leak after this prepared path has already consumed the result. Use the statement query helper for this simple SELECT 1 check to avoid the prepared statement cleanup path without ignoring close exceptions.
### Release note
None
### Check List (For Author)
- Test: Manual test
- bash -n run-regression-test.sh
- /tmp/arrow-flight-close-repro JDBC statement path against 127.0.0.1:43080 repeated 10 times
- ./run-regression-test.sh --run -d arrow_flight_sql_p0 -s test_auth_remote_ip -g arrow_flight_sql (failed in current local cluster at Arrow Flight SQL authentication: Access denied for user 'flight_auth_remote_ip_user@0.0.0.0'; did not reach SELECT 1/close path)
- Behavior changed: No
- Does this need documentation: No
Contributor
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
Member
Author
|
run buildall |
Member
Author
|
/review |
Contributor
There was a problem hiding this comment.
Review result: no blocking issues found.
Critical checkpoint conclusions:
- Goal and proof: The PR changes
test_auth_remote_ipto execute the finalSELECT 1throughJdbcUtils.executeQueryToList, avoiding the Arrow Flight SQL prepared-statement path while preserving the remote-IP auth assertion. The changed assertion still verifies one row with value 1. The PR reports manual coverage; I additionally checked the diff andgit diff --check. - Scope and clarity: The change is small and focused: one import plus replacing
sql_impl(conn, "SELECT 1")with the existing statement-query utility. - Concurrency and lifecycle: No new concurrency, shared state, lock ordering, static initialization, or special lifecycle management is introduced.
- Configuration and compatibility: No config, protocol, storage format, FE-BE contract, or rolling-upgrade compatibility changes are introduced.
- Parallel paths: Existing helpers already distinguish prepared execution from statement execution (
executeToListvsexecuteQueryToList/arrow_flight_sql_no_prepared); this test intentionally switches only the affected single-query path. - Conditions and error handling: Existing cleanup behavior is preserved, including dropping test users in
finallyand not suppressing the connection close path under test. - Test coverage and results: This is a regression-test-only fix. No
.outresult changes are needed because the test uses assertions rather than generated query output. - Observability, transactions, persistence, writes, memory tracking: Not applicable to this test-only change.
- Performance: Not relevant beyond avoiding the problematic prepared-statement path; no hot-path production code is changed.
User focus response: no additional user-provided review focus was present.
morrySnow
approved these changes
Jun 3, 2026
github-actions Bot
pushed a commit
that referenced
this pull request
Jun 3, 2026
…st (#64024) ### What problem does this PR solve? Related PR: [63506](#63506) Problem Summary: `test_auth_remote_ip` only needs to verify that Arrow Flight SQL remote IP authentication allows a matched user to run `SELECT 1`. The shared `sql_impl` helper uses `PreparedStatement`, and Arrow Flight SQL JDBC 17 can report a close-time 8-byte client allocator leak after the prepared path has already consumed the result. This changes the case to use `JdbcUtils.executeQueryToList`, which uses `createStatement().executeQuery(...)`, so the test avoids the prepared statement cleanup path without ignoring `conn.close()` exceptions.
github-actions Bot
pushed a commit
that referenced
this pull request
Jun 3, 2026
…st (#64024) ### What problem does this PR solve? Related PR: [63506](#63506) Problem Summary: `test_auth_remote_ip` only needs to verify that Arrow Flight SQL remote IP authentication allows a matched user to run `SELECT 1`. The shared `sql_impl` helper uses `PreparedStatement`, and Arrow Flight SQL JDBC 17 can report a close-time 8-byte client allocator leak after the prepared path has already consumed the result. This changes the case to use `JdbcUtils.executeQueryToList`, which uses `createStatement().executeQuery(...)`, so the test avoids the prepared statement cleanup path without ignoring `conn.close()` exceptions.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What problem does this PR solve?
Related PR: 63506
Problem Summary:
test_auth_remote_iponly needs to verify that Arrow Flight SQL remote IP authentication allows a matched user to runSELECT 1. The sharedsql_implhelper usesPreparedStatement, and Arrow Flight SQL JDBC 17 can report a close-time 8-byte client allocator leak after the prepared path has already consumed the result. This changes the case to useJdbcUtils.executeQueryToList, which usescreateStatement().executeQuery(...), so the test avoids the prepared statement cleanup path without ignoringconn.close()exceptions.Release note
None
Check List (For Author)
bash -n run-regression-test.sh/tmp/arrow-flight-close-reproJDBC statement path against127.0.0.1:43080repeated 10 times./run-regression-test.sh --run -d arrow_flight_sql_p0 -s test_auth_remote_ip -g arrow_flight_sqlfailed in the current local cluster at Arrow Flight SQL authentication:Access denied for user 'flight_auth_remote_ip_user@0.0.0.0'; it did not reach theSELECT 1/close path.