Skip to content

Commit 3832fe3

Browse files
committed
Verify body in doScheduleAsyncCleanupRequest
We observed rare cases when we got non-JSON result in doScheduleAsyncCleanupRequest and current logging does not provide enough information to understand the root cause.
1 parent 3fe9a30 commit 3832fe3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

core/trino-main/src/main/java/io/trino/server/remotetask/HttpRemoteTask.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -975,6 +975,10 @@ private void doScheduleAsyncCleanupRequest(Backoff cleanupBackoff, Request reque
975975
public void onSuccess(JsonResponse<TaskInfo> result)
976976
{
977977
try {
978+
if (!result.hasValue()) {
979+
log.warn("TaskInfo result did not contain JSON payload; payload=" + result.getResponseBody());
980+
throw new IllegalArgumentException("TaskInfo result did not contain JSON payload");
981+
}
978982
updateTaskInfo(result.getValue());
979983
}
980984
finally {

0 commit comments

Comments
 (0)