Skip to content

fix(frontend): backport buffered TLS handshake fix to 4.2.8 hotfix - #32748

Merged
XuPeng-SH merged 1 commit into
matrixorigin:v4.2.8-hotfixfrom
XuPeng-SH:codex/pr32671-release-tls-hotfix
Nov 14, 2026
Merged

XuPeng-SH merged 1 commit into
matrixorigin:v4.2.8-hotfixfrom
XuPeng-SH:codex/pr32671-release-tls-hotfix

Conversation

@XuPeng-SH

@XuPeng-SH XuPeng-SH commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

What type of PR is this?

  • API-change
  • BUG
  • Improvement
  • Documentation
  • Feature
  • Test and CI
  • Code Refactoring

Which issue(s) this PR fixes:

Related to #29928. Release-branch follow-up to #29996; discovered while qualifying SDK #32671.

What this PR does / why we need it:

On the actual v4.2.8-hotfix branch, the MySQL reader can consume SSLRequest and TLS ClientHello together. Upgrading the raw socket then loses the buffered TLS bytes, causing a pre-authentication hang or EOF. Preserve that prefix at both TLS handoffs while forwarding the original socket, deadlines and close/liveness operations.

This is the complete four-file backport of #29996, cherry-picked from 2bc83b0b9a2 onto release base c66030006fc. It adds no client retry, TLS fallback, catalog change or runner.

Validation on Linux/amd64, Go 1.26.4: all nine focused TLS/disconnect roots pass normally and under race; the complete frontend package, gofmt, go vet and incremental golangci-lint pass. An independent real-service probe sends SSLRequest and ClientHello in a single write, negotiates verified TLS 1.3 and authenticates SELECT 1 successfully. Source candidate identity is 8.0.30-MatrixOne-v4.2.8-hotfix, git dbd8358db62, binary SHA-256 e16a080574bcc8a8ef7d3ddcaa990f0a86a45ce64a295023309f471261ae2688.

This source candidate does not change the immutable published v4.2.8-hotfix-20261114 asset. That published binary still reproduces the failure. Full SDK qualification and its distinct release/main identities are tracked in #32671; no published release or production deployment is performed here.

Complete SDK qualification against this actual release-branch build now passes 1298/1298 online and 340/340 analytics cases with zero failures/errors/skips. All required TLS, certificate/hostname rejection and original Chinese-search assertions remain active. See #32671 for the separate SDK hotfix-version fixes and immutable-release counterevidence.

)

- [ ] API-change
- [x] BUG
- [ ] Improvement
- [ ] Documentation
- [ ] Feature
- [ ] Test and CI
- [ ] Code Refactoring

issue matrixorigin#29928

Preserve bytes read ahead of the MySQL SSLRequest when upgrading to TLS.
The TLS handoff now drains unread frontend buffer bytes before reading
the underlying connection, and both handshake branches use the handoff.
Added a real coalesced ClientHello TLS regression and post-handshake
payload check.

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
(cherry picked from commit 2f43dee)
(cherry picked from commit 2bc83b0)
@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@mergify

mergify Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

This pull request is merged.

@XuPeng-SH

XuPeng-SH commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor Author

mo-bot review · mo-bot-local · done

Commit: dbd8358db6258b59d66d874a21801cbac0f43712

Review completed. Read the assessment.

@XuPeng-SH XuPeng-SH left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mo-bot review · mo-bot-local · review

Commit: dbd8358db6258b59d66d874a21801cbac0f43712

Assessment: approve

Both TLS handoffs now preserve read-ahead bytes and retain socket ownership, deadlines and disconnect detection. The bounded adapter is a proportionate extension of the existing buffer owner. No actionable findings remain.

Model: gpt-6.1-sol / max

Session: 01a1a004-9884-72c0-ad39-f096c4209c4a · slot 1 · generation 0

Validation:

  • Reviewed the complete four-file delta, both handshake branches, buffer/close/disconnect consumers, all three discussion entries and linked issue #29928 with its four comments.

  • Local bounded source and formatting audit passed: frozen patch equivalence, clean source, git diff --check, gofmt on four files and inventory of nine focused test roots. Evidence: checks/1794647695980047203-2.json, review-source-audit.stdout.log and review-source-audit.json.

  • Reused attributed exact-head reports for nine focused normal/race tests, the frontend suite, static checks, verified TLS 1.3 authentication/SELECT 1 and SDK qualification of 1298 online plus 340 analytics cases.

Limitations:

  • No independent local Go/race, live TLS or SDK execution; raw author logs were not supplied.

  • The frozen CI snapshot is not green: CI Required failed, with other jobs pending or cancelled. Those statuses were not counted as passes; the aggregate failure's root cause remains unverified.

  • Darwin runtime remains unverified. The immutable published hotfix binary is unchanged by this source PR.

@XuPeng-SH
XuPeng-SH merged commit 01f8a88 into matrixorigin:v4.2.8-hotfix Nov 14, 2026
49 of 55 checks passed

This branch was previously deployed

1 inactive deployment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/bug Something isn't working kind/test-ci size/M Denotes a PR that changes [100,499] lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants