Skip to content

Make min/max block times based on span times#1314

Merged
joe-elliott merged 11 commits intografana:mainfrom
joe-elliott:min-max-dates
Mar 1, 2022
Merged

Make min/max block times based on span times#1314
joe-elliott merged 11 commits intografana:mainfrom
joe-elliott:min-max-dates

Conversation

@joe-elliott
Copy link
Copy Markdown
Collaborator

What this PR does:
Currently min/max times on block ranges are based on the ingestion time of spans. This PR does two things:

  • Makes the min/max time range on the blocks dependent on the span times
  • Correctly restores min/max time of a block on wal replay

These two changes will improve accuracy of searches.

Which issue(s) this PR fixes:
Ticks a box on #1175

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Comment thread modules/ingester/trace.go Outdated

start, end, err := t.decoder.FastRange(trace)
if err != nil {
return fmt.Errorf("failed to get range while adding segment %w", err)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nit add : %w for error separation.

… binary test

Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Copy link
Copy Markdown
Contributor

@zalegrala zalegrala left a comment

Choose a reason for hiding this comment

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

This looks good to me. Nice work on the tests.

@joe-elliott joe-elliott merged commit 72d56ec into grafana:main Mar 1, 2022
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.

3 participants