CalvinKirs opened a new pull request, #69463:
URL: https://github.com/apache/doris/pull/69463
### What problem does this PR solve?
Related PR: #69314
Problem Summary:
- `COM_STMT_SEND_LONG_DATA` returns an unexpected response and does not bind
uploaded chunks, leaving streaming clients out of sync. Accept chunks without
replying, defer upload errors until EXECUTE, and clear uploaded data after
execution or RESET.
- Reusing cached server-prepared statements through a non-master FE can fail
because the master prepares each forwarded execution independently. Forward
complete parameter types and values, including streamed parameters, and use the
active prepare-stage context during proxy planning.
- Empty results with `useCursorFetch=true` can hang or leave unread packets,
including when connection attributes are absent or rewritten. Return an empty
cursor, complete FETCH with `LAST_ROW_SENT`, and preserve framing for older FEs
through an optional peer capability.
- Completed EXECUTE payloads can remain attached to idle connections.
Release command payload buffers after response finalization and forwarding
finish.
Backport adaptations for branch-4.2:
- Keep protocol state in the existing `ConnectContext`/`ConnectProcessor`
architecture and preserve branch-4.2's expansion of cached parameter types only
when forwarding.
- Regenerate regression expectations with the standard test script to retain
branch-4.2's existing VARBINARY function semantics.
### Release note
Fix streamed prepared parameters, repeated prepared execution through
non-master FEs, and empty cursor fetch hangs.
### Check List (For Author)
- Test
- [x] Regression test: `prepared_stmt_p0/send_long_data` and
`prepared_stmt_p0/cursor_fetch_empty_result` passed with
`run-regression-test.sh`.
- [x] Unit Test: 91 FE tests passed with `run-fe-ut.sh`, with zero
failures, errors or skips.
- [x] Manual test: Connector/J 8.0.27, 8.0.33, 8.4.0 and 9.7.0 each
passed 428 checks against the built branch-4.2 FE and BE 4.1.3. Connect
explicitly to master and follower endpoints; verify streamed bytes, empty
streams and statement reuse; run 50 batches of three rows per version and
compare all stored values; alternate empty/nonempty cursor results with and
without connection attributes, including forwarded execution and connection
reuse.
- [x] Full FE build passed via `build.sh --fe`; Checkstyle passed with
zero violations.
- Behavior changed:
- [x] Yes. Long-data uploads have no response; forwarded parameters are
self-contained; empty cursors complete through FETCH; completed command buffers
are released.
- 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
--
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]