Skip to content

Commit

Permalink
Fix LinearRing serialization issue while emitting task description in…
Browse files Browse the repository at this point in the history
… a trace log

Signed-off-by: Rishabh Maurya <[email protected]>
  • Loading branch information
rishabhmaurya committed Mar 21, 2024
1 parent e673b61 commit 1924c28
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion server/src/main/java/org/opensearch/tasks/TaskManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,13 @@ public Task register(String type, String action, TaskAwareRequest request) {
Objects.requireNonNull(task);
assert task.getParentTaskId().equals(request.getParentTask()) : "Request [ " + request + "] didn't preserve it parentTaskId";
if (logger.isTraceEnabled()) {
logger.trace("register {} [{}] [{}] [{}]", task.getId(), type, action, task.getDescription());
String taskDescription = "";
try {
taskDescription = task.getDescription();
} catch (Exception e) {
logger.trace("Exception while fetching task description", e);
}
logger.trace("register {} [{}] [{}] [{}]", task.getId(), type, action, taskDescription);
}

if (task.supportsResourceTracking()) {
Expand Down

0 comments on commit 1924c28

Please sign in to comment.