chovy-3012 opened a new pull request, #13309:
URL: https://github.com/apache/seatunnel/pull/13309

   
   ### Purpose of this pull request
   
   The Doris source sends its FE `_query_plan` requests through 
`HttpURLConnection`, while the configured `doris.request.connect.timeout.ms` / 
`doris.request.read.timeout.ms` were set on an Apache `RequestConfig` that this 
code path never used, so a slow or unreachable FE could hang a source job 
indefinitely. This PR sets the connect/read timeouts on both the GET and POST 
paths in `RestService` (values passed in from `send()`), removes the dead 
`RequestConfig`, and corrects the EN/ZH doc rows for 
`doris.request.read.timeout.ms` to "FE or BE" (the connect-timeout row already 
said so). Fixes #13306.
   
   ### Does this PR introduce _any_ user-facing change?
   
   Yes. A source job whose FE is slow or unreachable now fails fast within the 
configured timeout (wrapped `DorisConnectorException`, root cause 
`SocketTimeoutException`) instead of hanging indefinitely — a behavior change 
compared with released versions 2.3.10–3.0.0, where the FE requests were 
unbounded.
   
   ### How was this patch tested?
   
   ```
   ./mvnw -pl :connector-doris test
   ./mvnw -pl :connector-doris spotless:check
   ```
   
   Added `RestServiceTest` with 2 cases: a local `HttpServer` that sleeps 10 s, 
asserting the request fails within the configured 3000 ms with 
`DorisConnectorException` rooted in `SocketTimeoutException`; both cases are 
red on the unfixed code (~10 s waits each) and green after the fix (2.587 s for 
both). Suite 162/162 green, spotless clean; a job-level before/after run 
swapping only the connector jar showed the read timeout going from 15070 ms 
(late response accepted) to 3064 ms (`Read timed out`) and the connect timeout 
going from unbounded (still connecting when killed at 12 s) to ~3 s (`connect 
timed out`).
   
   ### Check list
   
   * [x] If any new Jar binary package adding in your PR, please add License 
Notice according
     [New License 
Guide](https://github.com/apache/seatunnel/blob/dev/docs/en/developer/new-license.md)
     — n/a, no new dependency added.
   * [x] If necessary, please update the documentation to describe the new 
feature. https://github.com/apache/seatunnel/tree/dev/docs
     — Done: the EN/ZH `Doris.md` rows for `doris.request.read.timeout.ms` were 
updated to cover FE or BE.
   * [x] If necessary, please update `incompatible-changes.md` to describe the 
incompatibility caused by this PR.
     — n/a, no incompatible change: the fix only makes the documented timeouts 
effective; no option semantics or persisted state change.
   * [ ] If you are contributing the connector code, please check that the 
following files are updated:
     1. Update 
[plugin-mapping.properties](https://github.com/apache/seatunnel/blob/dev/plugin-mapping.properties)
 and add new connector information in it
     2. Update the pom file of 
[seatunnel-dist](https://github.com/apache/seatunnel/blob/dev/seatunnel-dist/pom.xml)
     3. Add ci label in 
[label-scope-conf](https://github.com/apache/seatunnel/blob/dev/.github/workflows/labeler/label-scope-conf.yml)
     4. Add e2e testcase in 
[seatunnel-e2e](https://github.com/apache/seatunnel/tree/dev/seatunnel-e2e/seatunnel-connector-v2-e2e/)
     5. Update connector 
[plugin_config](https://github.com/apache/seatunnel/blob/dev/config/plugin_config)
     — Existing connector, so 1/2/3/5 are n/a; unit tests added in 
`RestServiceTest`; no E2E case added because the Testcontainers Doris IT cannot 
provide a deterministic slow or unreachable FE (verified via the unit tests and 
the job-level before/after run above).
   


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

Reply via email to