You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by "kfaraz (via GitHub)" <gi...@apache.org> on 2026/08/12 08:55:44 UTC
[PR] minor: Add method Task.getDefaultPriority and coerce priority value t… (druid)
kfaraz opened a new pull request, #19984:
URL: https://github.com/apache/druid/pull/19984
### Description
We recently encountered an issue where the priority of a task being specified as a string would cause `TaskQueue` management to fail and essentially stall all ingestion.
### Fix
- Add method `Task.getDefaultPriority()`
- Update `Task.getPriority()` to use `getDefaultPriority()` and coerce string values to integer using `QueryContexts.getAsInt()`.
<hr>
<!-- Check the items by putting "x" in the brackets for the done things. Not all of these items apply to every PR. Remove the items which are not done or not relevant to the PR. None of the items from the checklist below are strictly necessary, but it would be very helpful if you at least self-review the PR. -->
This PR has:
- [ ] been self-reviewed.
- [ ] using the [concurrency checklist](https://github.com/apache/druid/blob/master/dev/code-review/concurrency.md) (Remove this item if the PR doesn't have any relation to concurrency.)
- [ ] added documentation for new or modified features or behaviors.
- [ ] a release note entry in the PR description.
- [ ] added Javadocs for most classes and all non-trivial methods. Linked related entities via Javadoc links.
- [ ] added or updated version, license, or notice information in [licenses.yaml](https://github.com/apache/druid/blob/master/dev/license.md)
- [ ] added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader.
- [ ] added unit tests or modified existing tests to cover new code paths, ensuring the threshold for [code coverage](https://github.com/apache/druid/blob/master/dev/code-review/code-coverage.md) is met.
- [ ] added integration tests.
- [ ] been tested in a test Druid 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: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
Re: [PR] minor: Coerce Task priority values in context to integer (druid)
Posted by "kfaraz (via GitHub)" <gi...@apache.org>.
kfaraz commented on PR #19984:
URL: https://github.com/apache/druid/pull/19984#issuecomment-5266886509
Thanks for the review, @gargvishesh !
> You would tackle the fail-everything-on-misconfigured-task in a separate PR?
I looked into this, but the case here doesn't seem like one where we are iterating over each task separately.
https://github.com/apache/druid/blob/5dd74a82c386dbcf7fcb16ea41d6e190e66d8fee/indexing-service/src/main/java/org/apache/druid/indexing/overlord/TaskQueue.java#L423-L427
This seems like a one off thing. I suppose we could try to invoke `getPriority` on each task within a for loop that has a try-catch but it seems overkill. We might want to have a try-catch for the `updateTaskEntry` invocations though. I will create a separate PR for that.
--
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: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
Re: [PR] minor: Coerce Task priority values in context to integer (druid)
Posted by "cryptoe (via GitHub)" <gi...@apache.org>.
cryptoe merged PR #19984:
URL: https://github.com/apache/druid/pull/19984
--
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: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org