morningman opened a new pull request, #70312:
URL: https://github.com/apache/doris/pull/70312
### Background
The regression framework's `streamLoad {}` reads its body from the suite's
`file`. For an S3 URL it streams the object from S3 while the BE consumes the
request body, so if the BE stalls, the S3 connection goes idle, and S3 closes
idle connections after about two minutes (#54613). `retryIfHttpError true`,
added by #54613, wraps that read in `ResumableHttpInputStream`: on an I/O error
it reopens the object with `Range: bytes=<offset>-` and the same stream load
continues. It never resends the load.
### What problem does this PR solve?
Issue Number: None
Related PR: #65337 (the branch-4.1 change by @shuke987, ported here), #54613
(added `retryIfHttpError`)
PR Type: Test
Problem Summary:
Thirty-five p1, p2 and docker suites stream large TPC-H, TPC-DS and similar
files from S3 without that option, so a single S3 disconnect fails the whole
suite. Branch-4.1 added the option to all 35 after its P2 case
`test_base_compaction_no_value` turned flaky (#65337). This PR adds the same 45
lines on master: 34 files become identical to branch-4.2, and
`test_read_from_peer` gets the line in master's version of its block.
### Details
- **Failure:** No public data for master: no PR pipeline runs these suites
(31 are p2, 2 p1, 2 docker), and the public P1 pipeline last ran on September
11. #65337 names the flaky branch-4.1 P2 case `test_base_compaction_no_value`.
- **Cause:** The framework reads an S3 input only as fast as the BE consumes
the load body. When the BE stalls, for example under high CPU in CI, the input
connection sits idle until S3 closes it, and the stream load fails with an I/O
error on its body.
- **Stability evidence:** With a local server that closes the first
connection partway through the file, a load with the option resumes at the byte
where the connection broke and loads every row exactly once; without it, the
load fails and nothing is committed (see Testing). Reopening is bounded
(`maxRetries = 3` per read), so an S3 object that stays unreachable still fails
the suite.
### Testing
A script that walks each added line to its enclosing block shows that all 45
sit inside a `streamLoad {}` block whose `file` is an S3 URL under
`${getS3Url()}/regression/`, and all 35 files pass an offline Groovy parse.
None of the 35 suites ran: they need multi-GB TPC-H and TPC-DS inputs from S3,
HDFS, or docker clusters.
To check the option on master's framework, a temporary suite ran on a local
single-FE, single-BE cluster built from master. It stream-loads a 200,000-row
CSV from a local HTTP server that closes the first connection after 1,000,000
of 2,777,790 bytes and serves `Range` requests:
| `streamLoad` | Result |
|---|---|
| with `retryIfHttpError true` | passes: the framework logs `Premature end
of Content-Length delimited message body (expected: 2,777,790; received:
1,000,000)` and reopens at offset 1000000, the server answers `bytes=1000000-`
with a 206, and the table then has 200,000 rows, 200,000 distinct keys and
`sum(k)` = 20000100000, matching the file |
| without it | fails: `ClientProtocolException` caused by the same
`ConnectionClosedException`; the table stays empty |
### Notes for Reviewers
- The framework never caches these inputs, so the option takes effect
wherever these suites run. `Config.enableCacheData` is a primitive `boolean`,
so the `== null` check in `fillDefaultConfig` never sets it to true, and the
`-ECD` and `-CD` options are built but never added to the parser. NonConcurrent
build 1094305, for example, streamed all 58 of its S3 inputs directly. This PR
leaves the framework as it is.
- As the comment on `ResumableHttpInputStream` says, resuming can hide a BE
that stalls a stream load for minutes; branch-4.x accepted that for these
suites in #65337.
### Release note
None
### Check List (For Author)
- Behavior changed: No
- Does this need documentation: No
- Pre-submission status: Partially verified: none of the 35 suites ran,
because they need large S3 inputs, HDFS, or docker clusters and no PR pipeline
runs them; the option was checked on master's framework with a local server
that drops the connection
### AI Disclosure
- Tool: Claude Code (Claude Opus 5.5)
- Generated: the port (taken from branch-4.2), the static checks, the local
verification, and this description
- Human review: not stated
- Prompts: The author asked to continue moving branch-4.2's changes back to
master with this task, branch-4.1's retry option for 35 suites. After seeing
that no public pipeline runs these suites, the author chose to port the change
as branch-4.2 has it and to check the retry mechanism on a local cluster.
--
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]