-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Include exception message in errorMessage for failed task #16286
Conversation
indexing-service/src/main/java/org/apache/druid/indexing/overlord/TaskQueue.java
Outdated
Show resolved
Hide resolved
…ord/TaskQueue.java Co-authored-by: Kashif Faraz <[email protected]>
@YongGang , |
+ "See overlord logs for more details."; | ||
errorMessage = StringUtils.format( | ||
"Encountered error[%s] while waiting for task to be ready. See Overlord logs for more details.", | ||
e.getMessage() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would also be a good idea to trim this message if it exceeds a certain length.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Kashif, updated the code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should be chopping only the contents of e.getMessage()
. Chopping out the parts while waiting for task to be ready. See Overlord logs for more details.
would be less user friendly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
e.getMessage() | |
StringUtils.chop(e.getMessage(), 100) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated
@@ -314,7 +315,7 @@ public boolean isReady(TaskActionClient taskActionClient) | |||
Assert.assertEquals(TaskState.FAILED, statusOptional.get().getStatusCode()); | |||
Assert.assertNotNull(statusOptional.get().getErrorMsg()); | |||
Assert.assertTrue( | |||
statusOptional.get().getErrorMsg().startsWith("Failed while waiting for the task to be ready to run") | |||
statusOptional.get().getErrorMsg().contains(exceptionMsg) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Better to verify the whole error message rather than contains.
Description
Following is an example of auto-compaction subtask failure we can see from task Status field in Druid console.
Now include the actual exception message in the task Status output to easily understand the failure instead of having to check from Overlord logs.
Key changed/added classes in this PR
TaskQueue.java
add exception message to errorMessageThis PR has: