Log exceptions in TcpTransport at DEBUG level#51612
Log exceptions in TcpTransport at DEBUG level#51612DaveCTurner merged 3 commits intoelastic:masterfrom
Conversation
When running Elasticsearch on a flaky network, we may see nodes leaving the cluster with reason `disconnected`. It may be useful to the cluster administrator to see the full exception that caused the disconnection, but this is only available with `TRACE` level logging which commingles the details of the problem with other messages that are not useful to end users. This commit promotes logging of exceptions in `TcpTransport` from `TRACE` to `DEBUG` to separate them from the truly `TRACE`-level messages.
|
Pinging @elastic/es-distributed (:Distributed/Network) |
original-brownbear
left a comment
There was a problem hiding this comment.
Makes sense IMO => LGTM
| Loggers.removeAppender(LogManager.getLogger(TcpTransport.class), appender); | ||
| appender.stop(); | ||
| IOUtils.close(tcpTransport); | ||
| testThreadPool.shutdown(); |
There was a problem hiding this comment.
NIT: Maybe use org.elasticsearch.threadpool.ThreadPool#terminate(java.util.concurrent.ExecutorService, long, java.util.concurrent.TimeUnit) here so we don't get the leaked thread warning when running this one?
Tim-Brooks
left a comment
There was a problem hiding this comment.
If we are going to implement these tests can we extract the exception handling to a separate class and test in a manner that does not require overriding the transport? See SecurityHttpExceptionHandler as a place where we extracted exception handling from the http transport.
|
Not sure of the value of a whole nother class for this, how about a static method? See a62032c. |
|
@elasticmachine please run elasticsearch-ci/default-distro |
When running Elasticsearch on a flaky network, we may see nodes leaving the cluster with reason `disconnected`. It may be useful to the cluster administrator to see the full exception that caused the disconnection, but this is only available with `TRACE` level logging which commingles the details of the problem with other messages that are not useful to end users. This commit promotes logging of exceptions in `TcpTransport` from `TRACE` to `DEBUG` to separate them from the truly `TRACE`-level messages.
In elastic#51612 we promoted certain log messages regarding unexpected network exceptions from `TRACE` to `DEBUG`. In fact it's often useful to see these exceptions by default, so with this commit we show the message (but not the stack trace) at `INFO` level. This commit also adds some commentary about what each of the exceptions means. Closes elastic#66473
In #51612 we promoted certain log messages regarding unexpected network exceptions from `TRACE` to `DEBUG`. In fact it's often useful to see these exceptions by default, so with this commit we show the message (but not the stack trace) at `INFO` level. This commit also adds some commentary about what each of the exceptions means. Closes #66473
When running Elasticsearch on a flaky network, we may see nodes leaving the
cluster with reason
disconnected. It may be useful to the clusteradministrator to see the full exception that caused the disconnection, but this
is only available with
TRACElevel logging which commingles the details ofthe problem with other messages that are not useful to end users.
This commit promotes logging of exceptions in
TcpTransportfromTRACEtoDEBUGto separate them from the trulyTRACE-level messages.