terrymanu commented on PR #39767:
URL: https://github.com/apache/shardingsphere/pull/39767#issuecomment-5578954483

   ### Result
   
   **Review Result: Mergeable**
   
   Standalone local candidate, code-scope review passed. The change resolves 
three confirmed vendor-code collisions in the metadata kernel-0 block by 
reassigning the undocumented colliding party to free codes, keeping every 
existing documented row on the documented, retained party.
   
   ### Evidence
   
   - Collisions verified at 
`infra/common/src/main/java/org/apache/shardingsphere/infra/exception/kernel/metadata/DuplicateColumnException.java:31`
 (3 → 13), `DuplicateIndexException.java:31` (5 → 14), and 
`mode/type/cluster/repository/api/src/main/java/org/apache/shardingsphere/mode/repository/cluster/exception/ClusterRepositoryPersistException.java:31`
 (10 → 16).
   - Vendor code composition is `kernelCode * 1000 + errorCode` at 
`KernelSQLException.java:46`; `MetaDataSQLException` is fixed at kernelCode 0, 
so prior values were 10003/10005/10010 and new values are 10013/10014/10016.
   - Freedom proven: all 21 repository-wide `MetaDataSQLException` subclasses 
use only error codes 0–8, 10, 12, 23, 24; codes 13/14 in `kernel/data-pipeline` 
belong to `PipelineSQLException` (kernelCode 8, 18xxx block) and do not 
collide; no 10013/10014/10015/10016 rows exist in the docs; 10015 intentionally 
avoided per the known downstream use.
   - Doc sync: 
`docs/document/content/user-manual/error-code/sql-error-code.cn.md:28-30` and 
`sql-error-code.en.md:28-30` add the three rows with message templates and SQL 
states (`DUPLICATE="42S01"`, `GENERAL_ERROR="HY000"`) matching the exception 
sources verbatim; existing 10003/10005/10010 rows are unchanged.
   - Test impact: no existing test asserts vendor codes for these three classes 
(type-only assertions, e.g. `ZookeeperRepositoryTest`, 
`ZookeeperExceptionHandlerTest`); the user explicitly declined new contract 
tests.
   - Verification: `./mvnw -pl infra/common,mode/type/cluster/repository/api 
-DskipTests package`, file-filtered `spotless:check -Pcheck`, file-filtered 
`checkstyle:check -Pcheck`, and `./mvnw apache-rat:check -Pcheck -T1C` all 
exited 0.
   - Behavior change (intentional, to be stated in the PR description): 
duplicate-column, duplicate-index, and cluster-repository-persist errors now 
return 10013/10014/10016 instead of 10003/10005/10010.
   
   ### Coverage
   
   - Candidate: standalone local task; baseline = clean working tree (only 
unrelated untracked `__pycache__` directories); attributed delta = the five 
files above with one frozen intent each and no unrelated hunks in the diff.
   - Behavior cluster: one — vendor-code uniqueness in the metadata kernel 
block. All three discovery lenses (root cause/behavior, blast radius/contracts, 
tests/operations) completed over that cluster; the convergence pass found no 
new candidate.
   - No unresolved gaps. The only adjacent in-scope fact (a pre-existing 
Javadoc typo in `DuplicateColumnException`) is left unchanged and unreported 
per scope rules.
   - Code-scope review only; CI was not reviewed.


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