FlyingZC commented on PR #38729:
URL: https://github.com/apache/shardingsphere/pull/38729#issuecomment-4553282589
Merge Verdict: Mergeable
Reviewed Scope:
- kernel/single/core: SingleSQLRouter
- Root behavior around filtering distributed tables from single-table
routing
- Performance impact on route hot path
- Local scoped verification for SingleSQLRouterTest
- pom.xml java-util upgrade, with JMH evidence considered for performance
justification
Not Reviewed Scope:
- Full repository CI beyond the scoped local checks
- Production workload benchmark beyond the provided JMH result
Need Expert Review:
- No additional expert review required. This is a localized route hot-path
simplification with performance evidence.
Basis:
- The latest implementation fixes the root cause directly by avoiding
construction of a new aggregated CaseInsensitiveSet in SingleSQLRouter.
- The route path now checks each
TableMapperRuleAttribute#getDistributedTableNames() directly, so it reuses the
original rule-provided collections and avoids unnecessary addAll copying.
- The case-insensitive behavior is preserved because the existing rule
attribute collections are used as-is.
- The helper isDistributedTable(...) keeps the route logic readable while
still using early return and avoiding intermediate collection allocation.
- No SQL semantics, parser behavior, YAML config, SPI contract, or routing
precedence is changed.
- Adversarial pass covered adjacent cases: empty distributed table
collections, case-insensitive distributed table lookup, non-create statement
fallback to rule.getSingleTables(...), and
normal single-table route behavior.
Pre-merge checks:
- Local scoped verification passed with dependent modules rebuilt:
./mvnw -Dmaven.repo.local=/Users/zc/.m2/workspaces/dbplus-engine-zc5 -pl
kernel/single/core -am -DskipITs -Dspotless.skip=true -Dtest=SingleSQLRouterTest
-Dsurefire.failIfNoSpecifiedTests=false test
--
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]