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

Do not review: Just to test multiple chained PRs in one go on CI (: #755

Closed
wants to merge 2 commits into from

Conversation

bwplotka
Copy link
Member

No description provided.

This is necessary to support newest TSDB.

Newest optimization (http://github.com/prometheus/tsdb/pull/486) makes tsdb.PostingForMatcher impossible to use.

This also hopefully reduce amount of code to understand as we don't need to necessarily fit into
index.Postings even though we don't need streaming for now. This should make the code less complex and more readable
(in comparision to previous `lazyPostings` implementation.

Signed-off-by: Bartek Plotka <bwplotka@gmail.com>
Copy link
Member

@FUSAKLA FUSAKLA left a comment

Choose a reason for hiding this comment

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

Just few nits I noticed.. (I missed the WIP prefix :/ )

@@ -164,7 +229,7 @@ func VerifyIndex(logger log.Logger, fn string, minTime int64, maxTime int64) err
}

type Stats struct {
// TotalSeries represents total number of series in block.
// TotalSeries represnts total number of series in block.
Copy link
Member

Choose a reason for hiding this comment

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

nit: former was correct if I'm not mistaken?

version, symbols, lvals, postings, err := ReadIndexCache(log.NewNopLogger(), fn)
testutil.Ok(t, err)

testutil.Equals(t, 2, version)
Copy link
Member

Choose a reason for hiding this comment

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

Test for different supported versions (version 1) would be great but that would require older TSDB code version I suppose which would be probably hard to do.

Copy link
Member Author

Choose a reason for hiding this comment

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

Very good point: It is not that difficult but some work needed. I described all here: #758

@@ -0,0 +1,142 @@
package metadata

// metadata package is implements writing and reading wrapped meta.json where Thanos puts its metadata.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
// metadata package is implements writing and reading wrapped meta.json where Thanos puts its metadata.
// metadata package implements writing and reading wrapped meta.json where Thanos puts its metadata.


// metadata package is implements writing and reading wrapped meta.json where Thanos puts its metadata.
// Those metadata contains external labels, downsampling resolution and source type.
// This package is minimal and separated because it usited by testutils which limits test helpers we can use in
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
// This package is minimal and separated because it usited by testutils which limits test helpers we can use in
// This package is minimal and separated because it used by testutils which limits test helpers we can use in

This PR does not add anything, however by upgrading Prometheus from 2.3.2 to master tip and same for TSDB it may affects few things.
Bigger packages we use and changes I found manually:
* prometheus/prometheus/discovery/file
  * [ENHANCEMENT] Discovery: Improve performance of previously slow updates of changes of targets. #4526 ?? cc @ivan-valkov
  * [BUGFIX] Wait for service discovery to stop before exiting #4508 ??
* prometheus/prometheus/promql:
  * [BUGFIX] PromQL: Fix a goroutine leak in the lexer/parser. #4858
  * [BUGFIX] Change max/min over_time to handle NaNs properly. #438
  * [BUGFIX] Check label name for `count_values` PromQL function. #4585
  * [BUGFIX] Ensure that vectors and matrices do not contain identical label-sets. #4589
  * [ENHANCEMENT] Optimize PromQL aggregations #4248
  * [BUGFIX] Only add LookbackDelta to vector selectors #4399
  * [BUGFIX] Reduce floating point errors in stddev and related functions #4533

* prometheus/prometheus/rules:
  * New metrics exposed! (prometheus evaluation!)
  * [ENHANCEMENT] Rules: Error out at load time for invalid templates, rather than at evaluation time. #4537

* prometheus/tsdb/index: Index reader optimizations.

There are things/fixes we may reuse in next PRs (TODO create gh issues for those):
* api changes (warnings support on Prometheus UI and Query API)
* UI fixes:
  * [ENHANCEMENT] Web UI: Support console queries at specific times. #4764
  * [ENHANCEMENT] Web UI: Avoid browser spell-checking in expression field. #472
* Use notifier package once prometheus/prometheus#5025 is merged.
* Ruler UI fixes:
 * [ENHANCEMENT] Show rule evaluation errors in UI #4457

Follopw up issues we can fix in further PRs:
* QueryAPI has now api/v1/labels that Thanos does not yet support. Created issue with details: #702
* #703

Signed-off-by: Bartek Plotka <bwplotka@gmail.com>

# Conflicts:
#	pkg/store/bucket.go
#	pkg/store/bucket_e2e_test.go
@bwplotka bwplotka changed the title WIP: Reusing CI (: Do not review: Just to test multiple chained PRs in one go on CI (: Jan 24, 2019
@bwplotka
Copy link
Member Author

@FUSAKLA thanks for review!

I addressed all your comments and added proper (chained) PR here: #704 Please review (:
Sorry for confusion!

@bwplotka bwplotka closed this Jan 24, 2019
@bwplotka bwplotka deleted the prometheus-upgrade-work branch January 24, 2019 09:51
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.

2 participants