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

rpc for querying ingesters to get chunk ids from its store #2601

Merged
merged 22 commits into from
Sep 18, 2020

Conversation

sandeepsukhani
Copy link
Contributor

@sandeepsukhani sandeepsukhani commented Sep 7, 2020

What this PR does / why we need it:
When using boltdb shipper ingesters have to serve logs from the store as well to include logs from chunks which are flushed but its index might not be uploaded yet. Due to this extra workload, ingesters are OOMing when someone runs a huge query.

To avoid this we need to offload the workload of logs processing to queriers. This can be done by adding a new RPC to ingesters to let queriers query for IDs of the chunks which were already flushed to the store.

This is still a draft PR to discuss the RPC definition. The actual implementation would follow.

Checklist

  • Tests updated

@codecov-commenter
Copy link

codecov-commenter commented Sep 11, 2020

Codecov Report

Merging #2601 into master will decrease coverage by 1.46%.
The diff coverage is 57.14%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2601      +/-   ##
==========================================
- Coverage   62.87%   61.41%   -1.47%     
==========================================
  Files         170      172       +2     
  Lines       15051    13312    -1739     
==========================================
- Hits         9464     8175    -1289     
+ Misses       4827     4394     -433     
+ Partials      760      743      -17     
Impacted Files Coverage Δ
pkg/logcli/query/query.go 35.59% <0.00%> (-3.07%) ⬇️
pkg/loki/loki.go 0.00% <0.00%> (ø)
pkg/loki/modules.go 3.80% <0.00%> (-0.35%) ⬇️
pkg/ingester/ingester.go 46.27% <45.45%> (-4.93%) ⬇️
pkg/querier/ingester_querier.go 64.75% <64.75%> (ø)
pkg/querier/querier.go 59.36% <86.66%> (-3.36%) ⬇️
pkg/storage/async_store.go 88.00% <88.00%> (ø)
pkg/storage/store.go 64.81% <88.88%> (-2.93%) ⬇️
pkg/logql/step_evaluator.go 57.14% <0.00%> (-9.53%) ⬇️
pkg/logql/marshal/labels.go 66.66% <0.00%> (-8.34%) ⬇️
... and 170 more

@sandeepsukhani sandeepsukhani marked this pull request as ready for review September 11, 2020 12:17
pkg/ingester/ingester.go Outdated Show resolved Hide resolved
pkg/ingester/ingester.go Outdated Show resolved Hide resolved
Copy link
Contributor

@oddlittlebird oddlittlebird left a comment

Choose a reason for hiding this comment

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

Minor editing and format suggestions.

docs/sources/operations/upgrade.md Outdated Show resolved Hide resolved
docs/sources/operations/upgrade.md Outdated Show resolved Hide resolved
docs/sources/operations/upgrade.md Outdated Show resolved Hide resolved
docs/sources/operations/upgrade.md Outdated Show resolved Hide resolved
docs/sources/operations/upgrade.md Outdated Show resolved Hide resolved
slim-bean
slim-bean previously approved these changes Sep 16, 2020
Copy link
Collaborator

@slim-bean slim-bean left a comment

Choose a reason for hiding this comment

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

I think this looks good @sandeepsukhani, some feedback from @oddlittlebird to address but lets get this merged!

@slim-bean slim-bean dismissed their stale review September 16, 2020 20:23

found something i think we need to fix

pkg/storage/store.go Outdated Show resolved Hide resolved
Copy link
Collaborator

@slim-bean slim-bean 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 great @sandeepsukhani nice work!

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

Successfully merging this pull request may close these issues.

4 participants