raghavyadav01 opened a new pull request, #20212:
URL: https://github.com/apache/pinot/pull/20212
## Summary
`POST /tasks/schedule` returns a map from task type to the names of the
tasks it scheduled. When a task type's generator ran but created no task, the
response still carried that task type, with an empty name:
```json
{"FileIngestionTask": "", "generationErrors": "", "schedulingErrors": ""}
```
A caller that polls the returned name then asks for a task called `""` and
fails with `TaskNotFoundException`, even though nothing went wrong.
This leaves such task types out of the response. The bundled clients
(`BootstrapTableTool`, `MaterializedViewQuickStart`) already read a missing
task type as "nothing scheduled", so they need no change. The status code stays
200: a run with no work to do is not an error. Generation and scheduling errors
are reported as before.
## Testing
- New
`PinotTaskRestletResourceTest.testScheduleTasksLeavesOutTaskTypesThatCreatedNoTask`:
one task type creates no task, one schedules a task, one does not run. Only
the scheduled one is returned. The test fails without this change.
- `PinotTaskRestletResourceTest`: 8/8 pass.
--
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]