OIiveirra opened a new pull request, #68811:
URL: https://github.com/apache/doris/pull/68811
### What problem does this PR solve?
Issue Number: N/A
Related PR: N/A
Problem Summary: JDBC schema lookup, scanning, and write failures previously
reported incomplete diagnostics: remote SQLSTATE and vendor error codes were
lost across FE catalog paths, delegated clients, and BE Java scanner/writer
wrappers, while repeated wrapping could duplicate or corrupt messages. This
change traverses SQLException cause and nextException graphs with cycle
detection and deduplication, carries diagnostics through a neutral connector
SPI, preserves original causes and Doris error codes, and consistently redacts
configured secrets and JDBC URLs in summaries and JNI stack traces. Existing
metadata fallbacks and connector lifecycle behavior remain intact.
### Release note
JDBC errors now expose separate remote_sqlstate and remote_vendor_error_code
fields while preserving Doris error-code semantics. The FE connector SPI is now
API 13.0 and the JNI plugin SPI is now API 5.0; external connector and JNI
plugins must be rebuilt against the updated APIs.
### Check List (For Author)
- Test <!-- At least one of them must be included. -->
- [x] Regression test
- [x] Unit Test
- [x] Manual test (add detailed scripts or steps below)
- [ ] No need to test or manual test. Explain why:
- [ ] This is a refactor/code format and no logic has been changed.
- [ ] Previous test can cover this change.
- [ ] No code files have been changed.
- [ ] Other reason <!-- Add your reason? -->
Validation details:
- 59 focused Java unit tests in 14 test classes passed with
`run-fe-ut.sh`.
- Standard ASAN FE/BE build with `build.sh --fe --be -j96` passed,
including Checkstyle and all nine JNI plugin layout checks.
- `test_jdbc_error_diagnostics` passed against MySQL 8 with
`run-regression-test.sh -d external_table_p0/jdbc -s
test_jdbc_error_diagnostics` (one suite, no failures or skips).
- MySQL protocol verification retained Doris ERROR 1105 / errCode=2
alongside remote SQLSTATE 42000 / vendor code 1142, emitted once without the
configured password.
- Behavior changed:
- [ ] No.
- [x] Yes. JDBC diagnostics now retain remote codes and sanitize
messages consistently across FE and BE wrappers.
- Does this need documentation?
- [x] No.
- [ ] Yes. <!-- Add document PR link here. eg:
https://github.com/apache/doris-website/pull/1214 -->
### Check List (For Reviewer who merge this PR)
- [ ] Confirm the release note
- [ ] Confirm test cases
- [ ] Confirm document
- [ ] Add branch pick label <!-- Add branch pick label that this PR should
merge into -->
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]