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

Close #3270: Prevent rollover lookback from passing the Unix epoch #3299

Merged
merged 2 commits into from
Oct 4, 2021

Conversation

ctreatma
Copy link
Contributor

@ctreatma ctreatma commented Sep 30, 2021

Which problem is this PR solving?

Resolves #3270

Short description of the changes

Version 1.26 introduced an automatic configuration for the query lookback
when using ElasticSearch with aliases enabled. When aliases are enabled,
the ES plugin will look back 100 years. This pre-dates the Unix epoch, and
while such dates can be modeled as negative timestamps, the model defined
in jaeger/model/time.go only supports unsigned timestamps. As a result,
the 100-year lookback ends up overflowing the time model, resulting in a
distant-future lookback date, rather than a distant-past lookback date.

While the time model could be updated to support negative timestamps, it
seems unlikely that any Jaeger users would reasonably need to search for
spans from the 1920s. This reduces the automatic lookback to 50 years to
remove the overflow issue while still providing an extremely long search
window that should serve even the most ambitious searches of historical
trace data.

@ctreatma ctreatma requested a review from a team as a code owner September 30, 2021 16:47
…Unix epoch

Version 1.26 introduced an automatic configuration for the query lookback
when using ElasticSearch with aliases enabled.  When aliases are enabled,
the ES plugin will look back 100 years.  This pre-dates the Unix epoch, and
while such dates can be modeled as negative timestamps, the model defined
in `jaeger/model/time.go` only supports unsigned timestamps.  As a result,
the 100-year lookback ends up overflowing the time model, resulting in a
distant-future lookback date, rather than a distant-past lookback date.

While the time model could be updated to support negative timestamps, it
seems unlikely that any Jaeger users would reasonably need to search for
spans from the 1920s.  This reduces the automatic lookback to 50 years to
remove the overflow issue while still providing an extremely long search
window that should serve even the most ambitious searches of historical
trace data.

Signed-off-by: Charles Treatman <charles_treatman@comcast.com>
@pavolloffay
Copy link
Member

@ctreatma great fix :)

Could you please sign the commits (DCO check)? https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md#certificate-of-origin---sign-your-work

pavolloffay
pavolloffay previously approved these changes Oct 1, 2021
@codecov
Copy link

codecov bot commented Oct 1, 2021

Codecov Report

Merging #3299 (baab745) into master (067dff7) will increase coverage by 0.03%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3299      +/-   ##
==========================================
+ Coverage   95.81%   95.84%   +0.03%     
==========================================
  Files         259      259              
  Lines       15413    15413              
==========================================
+ Hits        14768    14773       +5     
+ Misses        554      551       -3     
+ Partials       91       89       -2     
Impacted Files Coverage Δ
plugin/storage/es/spanstore/reader.go 100.00% <ø> (ø)
plugin/storage/integration/integration.go 78.88% <0.00%> (-0.40%) ⬇️
plugin/storage/badger/spanstore/reader.go 96.21% <0.00%> (+0.70%) ⬆️
cmd/query/app/server.go 95.58% <0.00%> (+1.47%) ⬆️

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 067dff7...baab745. Read the comment docs.

albertteoh
albertteoh previously approved these changes Oct 1, 2021
Signed-off-by: Charles Treatman <charles_treatman@comcast.com>
@pavolloffay pavolloffay merged commit 2b7fb73 into jaegertracing:master Oct 4, 2021
@ctreatma ctreatma deleted the fix-es-alias-lookback branch October 4, 2021 20:27
@oliversalzburg
Copy link

What's the workaround until this is released? Downgrade to 1.25?

@joe-elliott joe-elliott added this to the v1.27.0 milestone Oct 6, 2021
@albertteoh
Copy link
Contributor

What's the workaround until this is released? Downgrade to 1.25?

@oliversalzburg in case you missed the notification, this fix is now available in release 1.27.

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.

Existing traces can't be opened from the trace id lookup UI (404 error received) - ES backend
5 participants