JNSimba opened a new pull request, #62870:
URL: https://github.com/apache/doris/pull/62870

   ### What problem does this PR solve?
   
   Issue Number: close #xxx
   
   Related PR: #xxx
   
   Problem Summary:
   
   `JdbcSourceOffsetProvider.cleanMeta()` and several other cdc_client RPCs 
called `future.get()` with no timeout. When the cdc_client (or PG/MySQL behind 
it) hangs, the call blocks forever. For `cleanMeta()` this is fatal because it 
runs inside `JobManager.dropJobInternal()` while holding 
`JobManager.writeLock()` — any subsequent `CREATE / DROP / SHOW JOB` on 
streaming jobs is then serialized behind the dead lock, effectively freezing 
the streaming-job control plane.
   
   ### Fix
   
   Introduce two configurable timeouts (mirroring the BE 
`brpc_light/heavy_work_pool` naming) and apply them to all 8 cdc_client RPC 
call sites:
   
   - `streaming_cdc_light_rpc_timeout_sec = 30` for `/api/close`, 
`/api/compareOffset`, `/api/getTaskOffset`, `/api/getFailReason` (expected 
sub-second).
   - `streaming_cdc_heavy_rpc_timeout_sec = 600` for `/api/initReader`, 
`/api/fetchSplits`, `/api/fetchEndOffset`, `/api/writeRecords` (may 
legitimately take minutes for schema discovery / large snapshot splits).
   
   Both configs are `mutable = true` so they can be tuned via `ADMIN SET 
FRONTEND CONFIG` without restarting FE.
   
   `BackendServiceClient.requestCdcClient` gains a timeout overload that 
applies a gRPC `withDeadlineAfter`; the per-call-site `future.get(...)` also 
passes the same timeout so the deadline is enforced on both sides.
   
   On timeout we WARN with a uniform line carrying `api / jobId / backend / 
timeout_sec` for easy log aggregation. `cleanMeta` keeps its existing 
swallow-on-failure semantics (a cleanup hiccup must not fail `DROP JOB`); the 
other seven sites throw `JobException` consistent with their existing 
`ExecutionException` handling.
   
   ### Release note
   
   Add streaming-job FE configs `streaming_cdc_light_rpc_timeout_sec` and 
`streaming_cdc_heavy_rpc_timeout_sec` to bound cdc_client RPCs.
   
   ### Check List (For Author)
   
   - Test
       - [ ] Regression test
       - [ ] Unit Test
       - [ ] Manual test (add detailed scripts or steps below)
       - [x] No need to test or manual test. Explain why:
           - [ ] This is a refactor/code format and no logic has been changed.
           - [ ] Previous test can cover this change.
           - [ ] No code files have been changed.
           - [x] Other reason: defensive timeout — main path behavior is 
unchanged, the new branch only triggers when cdc_client itself is misbehaving 
(which is hard to reproduce in CI).
   
   - Behavior changed:
       - [x] No.
       - [ ] Yes.
   
   - Does this need documentation?
       - [x] No.
       - [ ] Yes.
   
   ### 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]

Reply via email to