menghaoranss commented on PR #38768:
URL: https://github.com/apache/shardingsphere/pull/38768#issuecomment-4593133488

   ### Decision
   
   - **Merge Verdict: Mergeable**
   - **Reviewed Scope:** Latest PR head 
`1e1b074cabdfad1bac4e7af90045450d18e0ceb6`; base `upstream/master` 
`0ee3f817c35aa1bdd269d752ba09c9cc43a7b39e`; merge-base 
`0ee3f817c35aa1bdd269d752ba09c9cc43a7b39e`.  
     File list matched GitHub `/pulls/38768/files` exactly (4 files):
     - 
`infra/session/src/main/java/org/apache/shardingsphere/infra/session/query/QueryContext.java`
     - 
`proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/connector/DatabaseProxyConnectorFactoryTest.java`
     - 
`proxy/frontend/dialect/mysql/src/test/java/org/apache/shardingsphere/proxy/frontend/mysql/command/query/binary/prepare/MySQLPreparedStatementMetadataFactoryTest.java`
     - 
`proxy/frontend/dialect/postgresql/src/test/java/org/apache/shardingsphere/proxy/frontend/postgresql/command/query/extended/bind/PostgreSQLComBindExecutorTest.java`
   - **Not Reviewed Scope:** CI/check-runs and full runtime integration were 
not part of this review.
   - **Need Expert Review:** No additional expert review required beyond normal 
module maintainers.
   
   ### Basis
   
   - Root-cause path in active call chain is `QueryContext#getUsedDatabase()` 
(used broadly in Proxy/JDBC execution flow); this method now uses a single 
metadata lookup and preserves `UnknownDatabaseException` behavior on missing DB.
   - The PR’s test adjustments are consistent with the production change: 
callers no longer need separate `containsDatabase(...)` stubs when 
`getDatabase(...)` already drives existence.
   - Fresh adversarial pass:
     - Cross-dialect/shared-path check: `getUsedDatabase()` is shared across 
Proxy/JDBC flows, and behavior remains stable for both existing DB and unknown 
DB branches.
     - Config-disabled path: no new feature flag/config branch introduced by 
this patch.
     - Partial-coverage risk: no unresolved semantic drift found on the 
modified execution path.
   
   ### Verification
   
   - Scope validation:
     - `git fetch upstream master pull/38768/head:pr-38768`
     - `git merge-base upstream/master pr-38768`
     - `git diff --name-status <merge-base>..pr-38768`
     - GitHub API `/pulls/38768` and `/pulls/38768/files` cross-check
   - Usage/impact validation:
     - `rg -n "getUsedDatabase\\(|new QueryContext\\(" infra proxy jdbc 
-g"*.java"`
     - Confirms `getUsedDatabase()` is the active path; `getUsedDatabases()` 
has no callsites in current tree.


-- 
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]

Reply via email to