branch-4.1: [fix](job-manager) cancelTaskById should not be blocked by unrelated streaming jobs #62940#63262
Conversation
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
|
run buildall |
1 similar comment
|
run buildall |
FE UT Coverage ReportIncrement line coverage |
FE Regression Coverage ReportIncrement line coverage |
|
run nonConcurrent |
2 similar comments
|
run nonConcurrent |
|
run nonConcurrent |
FE Regression Coverage ReportIncrement line coverage |
|
run nonConcurrent |
FE Regression Coverage ReportIncrement line coverage |
1 similar comment
FE Regression Coverage ReportIncrement line coverage |
…streaming jobs (#62940) ### What problem does this PR solve? Problem Summary: `JobManager.cancelTaskById` rejects all `CANCEL TASK` calls when any streaming job exists in `jobMap`. The streaming-type check is placed before the `jobName` match, so it fires on every iteration: ```java for (T job : jobMap.values()) { if (job.getJobConfig().getExecuteType().equals(JobExecuteType.STREAMING)) { throw new JobException("streaming job not support cancel task by id"); } if (job.getJobName().equals(jobName)) { ... } } ``` If a single streaming job exists in `jobMap`, `CANCEL TASK FOR <any-non-streaming-job>` throws "streaming job not support cancel task by id" before ever matching the actual target. ### Fix Move the streaming-type check inside the `jobName` match, so it only fires when the matched job is actually a streaming job. ### Release note Fix `CANCEL TASK` on non-streaming jobs incorrectly rejected when an unrelated streaming job exists in the job map.
c540492 to
38f06e1
Compare
|
run buildall |
FE Regression Coverage ReportIncrement line coverage |
|
run p0 |
FE Regression Coverage ReportIncrement line coverage |
Cherry-picked from #62940