Skip to content

Commit 64fa87d

Browse files
carlosdelestmridula-s109
authored andcommitted
Update comments for logging in SearchService (elastic#134735)
1 parent c73a815 commit 64fa87d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

server/src/main/java/org/elasticsearch/search/SearchService.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -615,7 +615,9 @@ static <T> ActionListener<T> wrapListenerForErrorHandling(
615615
shardId,
616616
taskId
617617
);
618-
// Keep this logic aligned with that of SUPPRESSED_ERROR_LOGGER in RestResponse
618+
// Keep this logic aligned with that of SUPPRESSED_ERROR_LOGGER in RestResponse.
619+
// Besides, log at DEBUG level when the service is stopped or closed, as at that point the HttpServerTransport
620+
// will already be closed and thus any error will not be reported or seen by the REST layer
619621
if (ExceptionsHelper.status(e).getStatus() < 500
620622
|| ExceptionsHelper.isNodeOrShardUnavailableTypeException(e)
621623
|| lifecycle.stoppedOrClosed()) {

0 commit comments

Comments
 (0)