morningman opened a new pull request, #67569:
URL: https://github.com/apache/doris/pull/67569
### What problem does this PR solve?
Related PR: #61050
Problem Summary:
An Arrow Flight SQL session has no `MysqlChannel`: `FlightSqlConnectContext`
overrides
`getMysqlChannel()` to throw `getMysqlChannel not in mysql connection`.
Since #61050,
`FEOpExecutor.buildStmtForwardParams()` reads the client's
`CLIENT_DEPRECATE_EOF` capability
straight off that channel, so on a multi-FE deployment every statement a
Flight connection has to
forward to the master fails with that message before the request is even
sent:
- any DDL issued over Arrow Flight SQL to a follower or observer FE;
- any statement at all when `force_forward_all_queries` is on.
`CLIENT_DEPRECATE_EOF` is a MySQL protocol capability, so only read it for a
MySQL connection. The
thrift field is `optional`, and leaving it unset for other protocols puts
the master back on the
packet layout it used before #61050 — `ConnectProcessor` applies it only when
`isSetClientDeprecatedEOF() && isClientDeprecatedEOF()`.
The MySQL path is byte-for-byte unchanged, and the new unit test pins that
down: with the fix
reverted the Flight case fails with the exact production message while both
MySQL cases stay green.
Known limitation this PR does not address: a forwarded statement that
carries a result set still
returns nothing over Arrow Flight SQL, because the proxy result is replayed
by
`ConnectProcessor.finalizeCommand()`, which is MySQL-only. This PR only
removes the failure.
### Release note
Fixed statements issued over Arrow Flight SQL failing with `getMysqlChannel
not in mysql connection`
when they had to be forwarded to the master FE.
### Check List (For Author)
- Test
- [x] Unit Test
- Behavior changed:
- [x] No.
- Does this need documentation?
- [x] No.
### Check List (For Reviewer who merge this PR)
- [ ] Confirm the release note
- [ ] Confirm test cases
- [ ] Confirm document
- [ ] Add branch pick label
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01CCAMVmoWN2MGVVsSRDCf2p
--
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]