seawinde opened a new pull request, #62082:
URL: https://github.com/apache/doris/pull/62082

   ## Problem
   
   When a MySQL client (e.g., DataWorks/SKYNET) connects to a **follower FE**, 
the `scheduleInfo` connection attribute is lost in the lineage `queryText` 
output.
   
   In HA mode, DML statements are forwarded from follower FE to master FE via 
thrift RPC. The `TMasterOpRequest` had no field for `connect_attributes`, 
causing them to be silently dropped. The master FE creates an empty 
`ConnectContext`, so `LineageUtils.buildLineageContext()` produces `queryText` 
without the `/* scheduleInfo={...} */` prefix.
   
   ## Fix
   
   1. **Thrift**: Add `connect_attributes` (field 33) to `TMasterOpRequest`
   2. **FEOpExecutor**: Serialize `connectAttributes` into forward params 
(inherited by `MasterOpExecutor`)
   3. **ConnectProcessor**: Restore `connectAttributes` in `proxyExecute()` on 
master FE
   
   ## Testing
   
   - `ConnectContextTest`: 4 tests for connectAttributes get/set, defensive 
copy, null/empty handling
   - `ConnectAttributesForwardTest`: 5 tests for forward path round-trip 
including scheduleInfo
   
   ## Files Changed
   
   | File | Change |
   |------|--------|
   | `gensrc/thrift/FrontendService.thrift` | Add `connect_attributes` to 
`TMasterOpRequest` |
   | `fe/.../qe/FEOpExecutor.java` | Serialize connectAttributes in forward 
params |
   | `fe/.../qe/ConnectProcessor.java` | Restore connectAttributes in 
`proxyExecute()` |
   | `fe/.../mysql/MysqlAuthPacket.java` | Fix stale comment |
   | + 2 test files | 9 new test cases |
   


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

Reply via email to