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

BUG: Remove TerminateAfter from Elasticsearch/Opensearch query resulting in incomplete span count/list #4336

Merged
merged 3 commits into from
May 15, 2023

Conversation

Jakob3xD
Copy link
Contributor

Which problem is this PR solving?

Closes #4330

Short description of the changes

  • Remove TerminateAfter from Elasticsearch/Opensearch query resulting in incomplete span count/list.

@Jakob3xD Jakob3xD requested a review from a team as a code owner March 23, 2023 11:58
@codecov
Copy link

codecov bot commented Apr 24, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.01 🎉

Comparison is base (5c3c20d) 97.07% compared to head (509c6f2) 97.08%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4336      +/-   ##
==========================================
+ Coverage   97.07%   97.08%   +0.01%     
==========================================
  Files         300      300              
  Lines       17728    17727       -1     
==========================================
+ Hits        17210    17211       +1     
+ Misses        416      415       -1     
+ Partials      102      101       -1     
Flag Coverage Δ
unittests 97.08% <100.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
plugin/storage/es/spanstore/reader.go 100.00% <100.00%> (ø)

... and 2 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Contributor

@albertteoh albertteoh left a comment

Choose a reason for hiding this comment

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

It seems quite reasonable to me to remove the terminate after. IIUC, its primary use case is to protect shards from using a large amount of memory while also improving query times.
However, I feel query correctness should take precedence, especially if shard capacity can be configured.

I've just added a suggestion relating to testing.

plugin/storage/es/spanstore/reader.go Outdated Show resolved Hide resolved
@Jakob3xD Jakob3xD force-pushed the bug-remove-terminate-after branch 2 times, most recently from e7ddc47 to c6a8069 Compare April 28, 2023 08:40
CHANGELOG.md Outdated Show resolved Hide resolved
@Jakob3xD
Copy link
Contributor Author

Jakob3xD commented May 8, 2023

@albertteoh @yurishkuro can we get this merged or is there anything left open?

@albertteoh
Copy link
Contributor

albertteoh commented May 9, 2023

For posterity, TerminateAfter was first introduced in this PR to address jaeger-query OOMing.

However, based on this SO answer and the ES docs, I don't see how TerminateAfter will help reduce memory pressure in jaeger-query although, iiuc, it can help reduce memory pressure in individual ES shards.

Maintainers: This bug fix is technically a breaking change, so I think we should report it as such in release notes.

@yurishkuro are you okay for this to be merged? I noticed you had some comments/questions in the linked issue.

@yurishkuro
Copy link
Member

I think you meant this PR #1283 (#1202 was closed unmerged)

@yurishkuro
Copy link
Member

This SO explanations also confirms that TerminateAfter is the wrong thing to do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Elastic/Opensearch backend does not return all trace spans
3 participants