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

Fix archive storage not querying old spans older than maxSpanAge #1617

Merged
merged 6 commits into from
Jun 21, 2019

Conversation

pavolloffay
Copy link
Member

Resolves #1511

Signed-off-by: Pavol Loffay <ploffay@redhat.com>
Signed-off-by: Pavol Loffay <ploffay@redhat.com>
Signed-off-by: Pavol Loffay <ploffay@redhat.com>
@codecov
Copy link

codecov bot commented Jun 20, 2019

Codecov Report

Merging #1617 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1617      +/-   ##
==========================================
+ Coverage   98.74%   98.74%   +<.01%     
==========================================
  Files         191      191              
  Lines        9169     9170       +1     
==========================================
+ Hits         9054     9055       +1     
  Misses         89       89              
  Partials       26       26
Impacted Files Coverage Δ
plugin/storage/es/spanstore/reader.go 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c55b314...b7a0eae. Read the comment docs.

Copy link
Contributor

@objectiser objectiser left a comment

Choose a reason for hiding this comment

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

LGTM - some minor issue.

I believe the only difference I can see is the searchAfter when not using archive - can you just provide a quick explanation of why the problem occurred (i.e. what was the underlying cause)?

@@ -305,6 +321,7 @@ func (s *SpanReader) multiRead(ctx context.Context, traceIDs []model.TraceID, st
indices := s.timeRangeIndices(s.spanIndexPrefix, startTime.Add(-time.Hour), endTime.Add(time.Hour))
nextTime := model.TimeAsEpochMicroseconds(startTime.Add(-time.Hour))

fmt.Println(indices)
Copy link
Contributor

Choose a reason for hiding this comment

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

Still required?

TagDotReplacement: tagKeyDeDotChar,
Archive: archive,
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: formatting looks wrong here

Copy link
Member Author

Choose a reason for hiding this comment

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

The check passed fine

Signed-off-by: Pavol Loffay <ploffay@redhat.com>
TerminateAfter(maxNumSpans).
Sort("startTime", true)
if !archive {
s.SearchAfter(nextTime)
Copy link
Member Author

Choose a reason for hiding this comment

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

This query uses scroll API https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-search-after.html.

SearchAfter says to include results with startTime parameter after nextTime. In archive storage we want to include all results.

Signed-off-by: Pavol Loffay <ploffay@redhat.com>
Signed-off-by: Pavol Loffay <ploffay@redhat.com>
@pavolloffay pavolloffay merged commit 4f5e04b into jaegertracing:master Jun 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Archived traces 404ing with elasticsearch storage
2 participants