kfaraz commented on code in PR #16182:
URL: https://github.com/apache/druid/pull/16182#discussion_r1535778633
##########
indexing-service/src/main/java/org/apache/druid/indexing/overlord/TaskStorageQueryAdapter.java:
##########
@@ -114,7 +114,7 @@ public Optional<Task> getTask(final String taskid)
return activeTask;
}
}
- catch (JsonProcessingException e) {
+ catch (DruidException e) {
Review Comment:
We have to do one of two things:
Either (1) Throw `JsonProcessingException` from `TaskQueue.getActiveTask()`,
catch it here, log it and fallback to using `TaskStorage` (catch block should
have a comment to this effect). In this case, `TaskQueue.getActiveTask` need
not log the exception.
Or (2) Throw `DruidException` from `TaskQueue.getActiveTask()` and don't
catch it anywhere.
I would prefer the latter as exception during serde shouldn't happen, and it
is best to notify the operator about it as soon as possible.
Also if there is an issue deserializing the task, the task storage would be
likely to encounter the same issue as it is the same mapper and the same Task
object.
--
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]