FrankChen021 commented on code in PR #20579:
URL: https://github.com/apache/druid/pull/20579#discussion_r4272312760
##########
server/src/main/java/org/apache/druid/server/compaction/CompactionSlotManager.java:
##########
@@ -378,7 +369,7 @@ public int computeSlotsRequiredForTask(
public static int computeSlotsRequiredForTask(ClientCompactionTaskQuery task)
{
if (task.isMsq()) {
- return getMaxTaskSlotsForMSQCompactionTask(task.getContext());
+ return
QueryContext.of(task.getContext()).getOrDefault(QueryContextParameters.MAX_NUM_TASKS);
Review Comment:
[P2] Handle malformed maxNumTasks during slot accounting
**Finding:** The typed lookup here throws BadQueryContextException for
malformed persisted task contexts, such as a JSON numeric maxNumTasks value of
2.5. The new catch in ClientCompactionRunnerInfo.validateMaxNumTasksForMSQ only
covers config validation; this overload is used when reserving slots for
running Overlord tasks, so one malformed task can abort coordinator slot
reservation instead of being handled.
**Suggestion:** Handle BadQueryContextException in the slot-accounting path
as well, or reuse a safe validation helper, and add a regression test for
malformed maxNumTasks through the static slot-calculation path.
--
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]