liaoxin01 opened a new pull request, #70171: URL: https://github.com/apache/doris/pull/70171
### What problem does this PR solve? Pick #53144 (merged commit 3ec56d7a796b9361d67203fcd9b7e2a32bbbeab4). Move stream load completion and replies into the fragment callback to release HTTP workers. Adapt renamed paths and preserve branch-4.2 log summaries and HttpRequest::set_header. Contains one backport commit. ### Review findings — keep as draft These upstream issues remain in the backport and need resolution before merging: - **High:** handle() overwrites ctx->status with _handle()'s OK return concurrently with _on_finish() storing the execution/commit result. The reply mutex does not protect these writes. Failure status and rollback decisions can be corrupted (be/src/service/http/action/stream_load.cpp:119-175). - **Medium:** Disconnecting before handle() leaves _can_send_reply false. on_free waits for the reply promise while the callback waits for permission to reply, blocking the HTTP worker for the full default 60 seconds (be/src/service/http/http_request.cpp:203-226). - **Medium:** Non-streaming upload write failures set an error before handle(). handle() then skips execution and sends no reply; no fragment exists to invoke a callback (be/src/service/http/action/stream_load.cpp:125-132). - **Medium:** With stream-load recording enabled, the response now contains the audit-enriched JSON and loses its trailing newline. Keep separate response and audit strings (be/src/service/http/action/stream_load.cpp:207-220). Findings are based on source and call-chain analysis, not runtime reproduction. The BE_TEST executor path also does not invoke the new callback; async completion, disconnect, error and commit-failure coverage is needed. ### Release note Stream load replies become asynchronous. Adds async_reply_timeout_s (default 60 seconds, minimum 3). ### Check List (For Author) - Test: git diff --check and repository clang-format 16 formatting/check scripts passed for all 18 changed files. No old StreamLoadContext promise/future references remain in BE sources/tests. - Build, UT, regression and clang-tidy: not run. The isolated checkout lacks hooks/setup_worktree.sh and thirdparty/installed; branch-4.2 also lacks the build-hygiene and clang-tidy wrapper scripts. No submodules initialized. - Behavior changed: Yes, stream load completion and HTTP reply scheduling. - Does this need documentation: Yes, document the new configuration before release. -- 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]
