Skip to content

Always log data node failures #127420

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Apr 29, 2025

Conversation

benchaplin
Copy link
Contributor

Adjust error listener:

From:

  • If error_trace = false, log exception then clear stack trace.
  • Else, do nothing.

To:
Always log exception.

  • If error_trace = false, clear stack trace.
  • Else, leave stack trace.

When working on #125732, I thought it'd be OK to skip logging the exception when error_trace = true because the stack trace would be sent to the coordinating node and logged in the REST suppressed logger. However, the REST suppressed logger logs nothing if there are partial results. That means there's no exception logged when error_trace = true and another shard succeeds. However, we're still interested in these errors and should log and alert on them.

@elasticsearchmachine elasticsearchmachine added needs:triage Requires assignment of a team area label v9.1.0 labels Apr 25, 2025
@benchaplin benchaplin added >bug Team:Search Foundations Meta label for the Search Foundations team in Elasticsearch :Search Foundations/Search Catch all for Search Foundations and removed needs:triage Requires assignment of a team area label v9.1.0 labels Apr 25, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-search-foundations (Team:Search Foundations)

@benchaplin benchaplin added v8.18.1 v8.19.0 v9.0.1 v9.1.0 auto-backport Automatically create backport pull requests when merged labels Apr 25, 2025
@elasticsearchmachine
Copy link
Collaborator

Hi @benchaplin, I've created a changelog YAML for you.

@benchaplin benchaplin force-pushed the always_log_data_node_failures branch from b54f67a to 7f21c17 Compare April 28, 2025 11:55
@benchaplin
Copy link
Contributor Author

@elasticsearchmachine run elasticsearch-ci/part-1

Copy link
Member

@javanna javanna left a comment

Choose a reason for hiding this comment

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

LGTM

@benchaplin benchaplin merged commit 0538958 into elastic:main Apr 29, 2025
17 checks passed
@elasticsearchmachine
Copy link
Collaborator

💔 Backport failed

Status Branch Result
8.18 Commit could not be cherrypicked due to conflicts
8.19 Commit could not be cherrypicked due to conflicts
9.0 Commit could not be cherrypicked due to conflicts

You can use sqren/backport to manually backport by running backport --upstream elastic/elasticsearch --pr 127420

benchaplin added a commit to benchaplin/elasticsearch that referenced this pull request Apr 29, 2025
Log search exceptions as they occur on the data node no matter the value
of error_trace.

(cherry picked from commit 0538958)

# Conflicts:
#	qa/smoke-test-http/src/internalClusterTest/java/org/elasticsearch/http/SearchErrorTraceIT.java
#	server/src/main/java/org/elasticsearch/search/SearchService.java
#	server/src/test/java/org/elasticsearch/search/SearchServiceTests.java
#	x-pack/plugin/async-search/src/internalClusterTest/java/org/elasticsearch/xpack/search/AsyncSearchErrorTraceIT.java
benchaplin added a commit to benchaplin/elasticsearch that referenced this pull request Apr 29, 2025
Log search exceptions as they occur on the data node no matter the value
of error_trace.

(cherry picked from commit 0538958)

# Conflicts:
#	server/src/main/java/org/elasticsearch/search/SearchService.java
#	server/src/test/java/org/elasticsearch/search/SearchServiceTests.java
@benchaplin
Copy link
Contributor Author

💚 All backports created successfully

Status Branch Result
9.0
8.19
8.18

Questions ?

Please refer to the Backport tool documentation

benchaplin added a commit to benchaplin/elasticsearch that referenced this pull request Apr 29, 2025
Log search exceptions as they occur on the data node no matter the value
of error_trace.

(cherry picked from commit 0538958)

# Conflicts:
#	qa/smoke-test-http/src/internalClusterTest/java/org/elasticsearch/http/SearchErrorTraceIT.java
#	server/src/main/java/org/elasticsearch/search/SearchService.java
#	server/src/test/java/org/elasticsearch/search/SearchServiceTests.java
#	x-pack/plugin/async-search/src/internalClusterTest/java/org/elasticsearch/xpack/search/AsyncSearchErrorTraceIT.java
elasticsearchmachine pushed a commit that referenced this pull request Apr 29, 2025
Log search exceptions as they occur on the data node no matter the value
of error_trace.

(cherry picked from commit 0538958)

# Conflicts:
#	qa/smoke-test-http/src/internalClusterTest/java/org/elasticsearch/http/SearchErrorTraceIT.java
#	server/src/main/java/org/elasticsearch/search/SearchService.java
#	server/src/test/java/org/elasticsearch/search/SearchServiceTests.java
#	x-pack/plugin/async-search/src/internalClusterTest/java/org/elasticsearch/xpack/search/AsyncSearchErrorTraceIT.java
elasticsearchmachine pushed a commit that referenced this pull request Apr 29, 2025
Log search exceptions as they occur on the data node no matter the value
of error_trace.

(cherry picked from commit 0538958)

# Conflicts:
#	server/src/main/java/org/elasticsearch/search/SearchService.java
#	server/src/test/java/org/elasticsearch/search/SearchServiceTests.java
elasticsearchmachine pushed a commit that referenced this pull request Apr 29, 2025
Log search exceptions as they occur on the data node no matter the value
of error_trace.

(cherry picked from commit 0538958)

# Conflicts:
#	qa/smoke-test-http/src/internalClusterTest/java/org/elasticsearch/http/SearchErrorTraceIT.java
#	server/src/main/java/org/elasticsearch/search/SearchService.java
#	server/src/test/java/org/elasticsearch/search/SearchServiceTests.java
#	x-pack/plugin/async-search/src/internalClusterTest/java/org/elasticsearch/xpack/search/AsyncSearchErrorTraceIT.java
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Automatically create backport pull requests when merged >bug >non-issue :Search Foundations/Search Catch all for Search Foundations Team:Search Foundations Meta label for the Search Foundations team in Elasticsearch v8.18.1 v8.19.0 v9.0.1 v9.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants