mrhhsg opened a new pull request, #71235: URL: https://github.com/apache/doris/pull/71235
### Background Remote spill writers share the object-storage upload thread pool with other workloads. The spill-only budget currently estimates queued bytes from the size of that shared queue and the configured upload buffer size. ### What problem does this PR solve? Issue Number: None Related PR: #70474 (original combined patch), #68032 (remote spill feature) PR Type: Bugfix Problem Summary: Unrelated uploads can throttle spill, and the shared-queue estimate excludes active uploads. Use each spill writer's submitted allocation capacity instead. ### Details - **Change map:** Production +115/-26, tests +283/-12. BE object-storage writer completion accounting, spill-only admission and targeted BE tests. The remote part-size floor is a second commit. - **Frequency:** Remote spill sharing the upload pool with other writers, or upload buffers spanning a mutable configuration change. - **Root cause:** The shared thread-pool queue size measures pending tasks rather than this spill manager's submitted buffer capacity. - **Why existing tests missed it:** They asserted a shared-queue limit rather than isolating non-spill traffic or checking submission, failure and completion against the actual allocation. - **Fix:** Charge the buffer's allocation capacity at submit, return the charge before signaling completion, and query only registered spill writers through weak progress views. Keep idle partial buffers out of the budget. Apply the configured object-storage buffer size as a minimum remote spill part threshold. - **Other paths and branches:** The threshold is soft and BE-wide; no pool scheduling, writer teardown, or directory cleanup change. Admission scans live progress views. Unrelated writers are not registered. ### Testing - Clang-format 16, build hygiene and `git diff --check` passed. - ASAN BE UT not yet completed on this split head; no test result is claimed. Command: `ENABLE_PCH=off USE_LIBCPP=OFF BUILD_TYPE_UT=ASAN ./run-be-ut.sh --run --filter=SpillFileS3Test.*:S3FileWriterTest.DisableFileCacheWriteFromS3FileWriter:S3FileWriterTest.multi_part_io_error:S3FileWriterTest.write_buffer_boundary -j20`. - No live-object-storage or performance benchmark result is claimed here. ### Notes for Reviewers Check both completion paths for exactly-once byte return before the countdown signal; a promoted weak view must not keep a writer alive. The new cases cover successful, failed and unrelated uploads, manager isolation and progress queries during synchronous discard. ### Release note Remote spill backpressure now counts queued and running spill upload buffers, not unrelated uploads. The remote spill part threshold is at least one object-storage upload buffer. ### Check List (For Author) - Behavior changed: Yes (see Details) - Does this need documentation: Yes; separate remote-spill user documentation is deferred. - Pre-submission status: Partially verified; see Testing. ### AI Disclosure - Tool: Codex - Generated: Patch extraction, targeted adaptations, and description. - Human review: Pending author review. -- 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]
