-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Update loki to cortex master #2030
Conversation
Checking on failing tests |
d251cfc
to
2f36328
Compare
Codecov Report
@@ Coverage Diff @@
## master #2030 +/- ##
==========================================
- Coverage 63.90% 63.87% -0.03%
==========================================
Files 133 133
Lines 10217 10223 +6
==========================================
+ Hits 6529 6530 +1
- Misses 3202 3205 +3
- Partials 486 488 +2
|
@@ -43,6 +43,7 @@ type Config struct { | |||
ExtraQueryDelay time.Duration `yaml:"extra_query_delay,omitempty"` | |||
IngesterMaxQueryLookback time.Duration `yaml:"query_ingesters_within,omitempty"` | |||
Engine logql.EngineOpts `yaml:"engine,omitempty"` | |||
MaxConcurrent int `yaml:"max_concurrent"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is the only configuration which is used in updated cortex code of frontend
worker. I have modified the code accordingly here https://github.com/grafana/loki/blob/2f3632878fbf31e31f2d2a998288d1eb675cb479/pkg/loki/modules.go#L160
Hope this change is fine
pkg/querier/queryrange/roundtrip.go
Outdated
@@ -197,6 +199,7 @@ func NewMetricTripperware( | |||
) | |||
|
|||
var c cache.Cache | |||
tombstone := purger.NewTombstonesLoader(nil, nil) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't have the purger
config in Loki
yet. Should we bring this config from cortex into this master update?
Still, we can initialize purger with nil
DeleteStore
. Initializing purger with nil
DeleteStore
should be noop.
@sandeepsukhani Hope I am correct here.
7ff859a
to
d77e614
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think overall it looks good. Just some minor nits.
pkg/querier/queryrange/roundtrip.go
Outdated
@@ -205,6 +207,7 @@ func NewMetricTripperware( | |||
limits, | |||
codec, | |||
extractor, | |||
tombstone, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@adityacs you can pass nil
here instead of creating NewTombstonesLoader
above, ResultsCacheMiddleware
should take care of it.
pkg/storage/store.go
Outdated
@@ -50,7 +51,8 @@ type store struct { | |||
|
|||
// NewStore creates a new Loki Store using configuration supplied. | |||
func NewStore(cfg Config, storeCfg chunk.StoreConfig, schemaCfg chunk.SchemaConfig, limits storage.StoreLimits, registerer prometheus.Registerer) (Store, error) { | |||
s, err := storage.NewStore(cfg.Config, storeCfg, schemaCfg, limits, registerer) | |||
tombstone := purger.NewTombstonesLoader(nil, nil) | |||
s, err := storage.NewStore(cfg.Config, storeCfg, schemaCfg, limits, registerer, tombstone) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can pass nil
here as well for tombstones loader to NewStore
.
@sandeepsukhani have made the requested changes. |
Please @sandeepsukhani can you ensure follow up of this PR ? Thank you ! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
All code paths return nil as the error, so we can simplify the code. Signed-off-by: Bryan Boreham <bryan@weave.works>
What this PR does / why we need it:
Update loki to cortex master
Which issue(s) this PR fixes:
Fixes #1786