Merge pull request #22146 from azat/writers-uncaught-exceptions

Fix uncaught exception in InterserverIOHTTPHandler
This commit is contained in:
alexey-milovidov 2021-03-26 17:23:09 +03:00 committed by GitHub
commit ac53d30e53
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -120,7 +120,7 @@ WriteBufferFromS3::~WriteBufferFromS3()
}
catch (...)
{
tryLogCurrentException(__PRETTY_FUNCTION__);
tryLogCurrentException(log);
}
}

View File

@ -107,6 +107,7 @@ void InterserverIOHTTPHandler::handleRequest(HTTPServerRequest & request, HTTPSe
}
catch (...)
{
tryLogCurrentException(log);
out.finalize();
}
};
@ -116,6 +117,7 @@ void InterserverIOHTTPHandler::handleRequest(HTTPServerRequest & request, HTTPSe
if (auto [message, success] = checkAuthentication(request); success)
{
processQuery(request, response, used_output);
used_output.out->finalize();
LOG_DEBUG(log, "Done processing query");
}
else