Skip to content

Conversation

@pugnascotia
Copy link
Contributor

The bulk processor used to index deprecation logs was doing nothing to
output any errors encountered when writing documents to ES. These are
now detected.

Also expand the deprecation REST tests to check the shape of the indexed
documents.

This is a partial forward-port from #61966, so no backport is required.

The bulk processor used to index deprecation logs was doing nothing to
output any errors encountered when writing documents to ES. These are
now detected.

Also expand the deprecation REST tests to check the shape of the indexed
documents.
@pugnascotia pugnascotia added >non-issue :Core/Infra/Logging Log management and logging utilities v8.0.0 labels Sep 9, 2020
@pugnascotia pugnascotia requested a review from pgomulka September 9, 2020 11:40
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra (:Core/Infra/Logging)

@elasticmachine elasticmachine added the Team:Core/Infra Meta label for core/infra team label Sep 9, 2020
Copy link
Contributor

@pgomulka pgomulka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - left minor comment

logger.trace(
"indexed [{}] deprecation documents into [{}]",
numberOfActions,
Arrays.stream(response.getItems()).map(BulkItemResponse::getIndex).distinct().collect(Collectors.joining(","))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: we could use

logger.trace(
                    "indexed [{}] deprecation documents into [{}]",
                    request::numberOfActions,
()->                 Arrays.stream(response.getItems()).map(BulkItemResponse::getIndex).distinct().collect(Collectors.joining(","))

passing parameters suppliers instead of guarding with logger.isTraceEnabled()
I understand that this pattern is common though - we probably don't have a elasticsearch wide convention for this

@pugnascotia pugnascotia merged commit 607b7c3 into elastic:master Sep 9, 2020
@pugnascotia pugnascotia deleted the deprecation-indexing-error-logging branch September 9, 2020 13:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Core/Infra/Logging Log management and logging utilities >non-issue Team:Core/Infra Meta label for core/infra team v8.0.0-alpha1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants