You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "FlyingZC (via GitHub)" <gi...@apache.org> on 2026/06/04 02:25:21 UTC
[PR] Remove redundant parameter replay invocations [shardingsphere]
FlyingZC opened a new pull request, #38793:
URL: https://github.com/apache/shardingsphere/pull/38793
Fixes #ISSUSE_ID.
Changes proposed in this pull request:
-
---
Before committing this PR, I'm sure that I have checked the following options:
- [ ] My code follows the [code of conduct](https://shardingsphere.apache.org/community/en/involved/conduct/code/) of this project.
- [ ] I have self-reviewed the commit code.
- [ ] I have (or in comment I request) added corresponding labels for the pull request.
- [ ] I have passed maven check locally : `./mvnw clean install -B -T1C -Dmaven.javadoc.skip -Dmaven.jacoco.skip -e`.
- [ ] I have made corresponding changes to the documentation.
- [ ] I have added corresponding unit tests for my changes.
- [ ] I have updated the Release Notes of the current development version. For more details, see [Update Release Note](https://shardingsphere.apache.org/community/en/involved/contribute/contributor/)
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Remove redundant parameter replay invocations [shardingsphere]
Posted by "strongduanmu (via GitHub)" <gi...@apache.org>.
strongduanmu merged PR #38793:
URL: https://github.com/apache/shardingsphere/pull/38793
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Remove redundant parameter replay invocations [shardingsphere]
Posted by "FlyingZC (via GitHub)" <gi...@apache.org>.
FlyingZC commented on PR #38793:
URL: https://github.com/apache/shardingsphere/pull/38793#issuecomment-4618456891
### Review Result
No blocking issues found.
- **Merge Verdict: Mergeable**
- **Reviewed Scope:** PR #38793 latest head `d106aae2aca7b0d0f5f0b9b5fcbf622d51901cd7`, merge-base `59ac3754fb09af71faa128ec0d5c26137945ce91`.
- **Changed Files:** `jdbc/src/main/java/org/apache/shardingsphere/driver/jdbc/adapter/AbstractPreparedStatementAdapter.java`
- **Not Reviewed Scope:** Full repository build and E2E suites were not run.
- **Need Expert Review:** No.
### Basis
This is a scoped JDBC refactor. The previous implementation rebuilt a `PreparedStatementInvocationReplayer` list for every replay, then immediately iterated it to call
`PreparedStatement#setObject(index, value)`. The new implementation directly iterates parameters and calls `preparedStatement.setObject(++index, each)`.
Behavior is preserved:
- Parameter order is unchanged.
- JDBC parameter indexes remain 1-based.
- The final JDBC setter call is still `PreparedStatement#setObject`.
- Batch replay still uses the existing `parameterSets` flow.
- No public API, SPI, parser, route, config, Proxy, or dialect-specific behavior is changed.
The performance direction is positive: it removes per-replay lambda/list-node allocations and one intermediate traversal. Complexity remains `O(parameter count)`, but the hot path is
simpler and allocates less.
### Verification
- GitHub `/pulls/38793/files` matched local triple-dot diff: exactly one modified file.
- Local PR-head verification:
- `./mvnw -pl jdbc -am -DskipITs -Dspotless.skip=true -Dtest=PreparedStatementAdapterTest -Dsurefire.failIfNoSpecifiedTests=false test` -> exit 0, `Tests run: 24, Failures: 0, Errors:
0, Skipped: 0`
- `./mvnw -pl jdbc -am checkstyle:check -Pcheck -T1C` -> exit 0
- `./mvnw -pl jdbc -am spotless:check -Pcheck -T1C` -> exit 0
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org