Skip to content
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

Changing search shard failure logging to trace from debug #8470

Merged
merged 3 commits into from
Jul 14, 2023

Conversation

sgup432
Copy link
Contributor

@sgup432 sgup432 commented Jul 6, 2023

Description

Currently we have logging level set to DEBUG for org.opensearch.action package like

logger.action.name = org.opensearch.action
logger.action.level = debug

Every time there is a failure on shard for example due to search queue size filling up, we log shard failure message along with complete exception stacktrace which is known to be expensive. So in scenarios, where there are a lot of queue rejections happening, this logging further degrades the cluster performance in terms of CPU, Heap, Disk I/O as mentioned here.

  • As part of this change, we are changing shard failure messages to TRACE. If needed we can enable it via cluster settings on demand.

Related Issues

Resolves #[Issue number to be closed when this PR is merged]
#7830

Alternate approach

  • Another approach would have been to change opensearch.action log level to INFO but this would impact other indexing, cluster manager classes as well, so doesn't make sense.
  • We could have also considered to change opensearch.action.search log level to INFO specifically but considering we have some useful non-harmful debug logs elsewhere, we don't want to do it for now.

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Commits are signed per the DCO using --signoff
  • Commit changes are listed out in CHANGELOG.md file (See: Changelog)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Signed-off-by: Sagar Upadhyaya <sagar.upadhyaya.121@gmail.com>
@sgup432
Copy link
Contributor Author

sgup432 commented Jul 6, 2023

@jainankitk @shwetathareja Can you take a quick look at this change?

@github-actions
Copy link
Contributor

github-actions bot commented Jul 6, 2023

Gradle Check (Jenkins) Run Completed with:

Signed-off-by: Sagar Upadhyaya <sagar.upadhyaya.121@gmail.com>
@github-actions
Copy link
Contributor

github-actions bot commented Jul 6, 2023

Gradle Check (Jenkins) Run Completed with:

  • RESULT: UNSTABLE ❕
  • TEST FAILURES:
      1 org.opensearch.cluster.routing.allocation.decider.DiskThresholdDeciderIT.testIndexCreateBlockIsRemovedWhenAnyNodesNotExceedHighWatermarkWithAutoReleaseEnabled

@sgup432 sgup432 changed the title Changing shard failure logging to trace from debug Changing search shard failure logging to trace from debug Jul 7, 2023
@sgup432
Copy link
Contributor Author

sgup432 commented Jul 13, 2023

@shwetathareja I would need help in merging this.

Signed-off-by: Sagar Upadhyaya <sagar.upadhyaya.121@gmail.com>
@sgup432
Copy link
Contributor Author

sgup432 commented Jul 13, 2023

@andrross @dblock @Bukhtawar Can anyone of you help me getting this reviewed or merged if looks okay?

@kotwanikunal
Copy link
Member

@sgup432 There are a few unresolved comments. You have responded but please resolve these conversations (either you or the commenter) before I can merge it in.

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

  • RESULT: UNSTABLE ❕
  • TEST FAILURES:
      1 org.opensearch.remotestore.SegmentReplicationRemoteStoreIT.testDropPrimaryDuringReplication
      1 org.opensearch.indices.replication.SegmentReplicationRelocationIT.testRelocateWhileContinuouslyIndexingAndWaitingForRefresh

@sgup432
Copy link
Contributor Author

sgup432 commented Jul 13, 2023

@kotwanikunal I have resolved the comments.

@shwetathareja shwetathareja merged commit e8f1c30 into opensearch-project:main Jul 14, 2023
@shwetathareja shwetathareja added the backport 2.x Backport to 2.x branch label Jul 14, 2023
opensearch-trigger-bot bot pushed a commit that referenced this pull request Jul 14, 2023
* Changing shard failure logging to trace from debug
* Moving the exception to trace logs

Signed-off-by: Sagar Upadhyaya <sagar.upadhyaya.121@gmail.com

---------

Signed-off-by: Sagar Upadhyaya <sagar.upadhyaya.121@gmail.com>
(cherry picked from commit e8f1c30)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
shwetathareja pushed a commit that referenced this pull request Jul 14, 2023
)

* Changing shard failure logging to trace from debug
* Moving the exception to trace logs

Signed-off-by: Sagar Upadhyaya <sagar.upadhyaya.121@gmail.com

---------


(cherry picked from commit e8f1c30)

Signed-off-by: Sagar Upadhyaya <sagar.upadhyaya.121@gmail.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
buddharajusahil pushed a commit to buddharajusahil/OpenSearch that referenced this pull request Jul 18, 2023
…-project#8470)

* Changing shard failure logging to trace from debug
* Moving the exception to trace logs

Signed-off-by: Sagar Upadhyaya <sagar.upadhyaya.121@gmail.com

---------

Signed-off-by: Sagar Upadhyaya <sagar.upadhyaya.121@gmail.com>
Signed-off-by: sahil buddharaju <sahilbud@amazon.com>
baba-devv pushed a commit to baba-devv/OpenSearch that referenced this pull request Jul 29, 2023
…-project#8470)

* Changing shard failure logging to trace from debug
* Moving the exception to trace logs

Signed-off-by: Sagar Upadhyaya <sagar.upadhyaya.121@gmail.com

---------

Signed-off-by: Sagar Upadhyaya <sagar.upadhyaya.121@gmail.com>
kaushalmahi12 pushed a commit to kaushalmahi12/OpenSearch that referenced this pull request Sep 12, 2023
…-project#8470)

* Changing shard failure logging to trace from debug
* Moving the exception to trace logs

Signed-off-by: Sagar Upadhyaya <sagar.upadhyaya.121@gmail.com

---------

Signed-off-by: Sagar Upadhyaya <sagar.upadhyaya.121@gmail.com>
Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>
shiv0408 pushed a commit to Gaurav614/OpenSearch that referenced this pull request Apr 25, 2024
…-project#8470)

* Changing shard failure logging to trace from debug
* Moving the exception to trace logs

Signed-off-by: Sagar Upadhyaya <sagar.upadhyaya.121@gmail.com

---------

Signed-off-by: Sagar Upadhyaya <sagar.upadhyaya.121@gmail.com>
Signed-off-by: Shivansh Arora <hishiv@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x Backport to 2.x branch skip-changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants