Commit graph

7921 commits

Author SHA1 Message Date
Fabian Reinartz c3e502b194 Merge pull request #168 from prometheus/fasterwal
wal: decode and process in separate threads.
2017-10-10 18:11:44 +02:00
Fabian Reinartz f347eac33d Merge pull request #171 from prometheus/safeclose
Add more verbose error handling for closing, reduce locking
2017-10-10 18:10:06 +02:00
Fabian Reinartz fb9da52b11 Add more verbose error handling for closing, reduce locking
This commit introduces error returns in various places and is explicit
about closing persisted blocks.
{Index,Chunk,Tombstone}Readers are more consistent about their Close()
method. Whenever a reader is retrieved, the corresponding close method
must eventually be called. We use this to track pending readers against
persisted blocks.

Querier's against the DB no longer hold a read lock for their entire
lifecycle. This avoids long running queriers to starve new ones when we
have to acquire a write lock when reloading blocks.
2017-10-10 12:13:37 +02:00
Fabian Reinartz 269b5cf936 Merge pull request #3245 from jlevesy/use-require-web
Imports benbjohnson/testing and use it in web package
2017-10-10 10:58:27 +02:00
Fabian Reinartz ea879df6aa Merge pull request #3265 from mathieui/better-cmdline-errors
Provide better errors messages in commandline
2017-10-10 10:53:30 +02:00
Brian Brazil 73dc96e7f5 Fix leak of ticker in remote storage queue manager. 2017-10-09 19:44:03 +01:00
Brian Brazil 5ee07b3b3a Update staticcheck ignores
Remove things that now longer apply, ignore new things
that are acceptable.
2017-10-09 19:44:03 +01:00
Brian Brazil cc5499fcad Only close after checking for err. 2017-10-09 19:44:03 +01:00
Brian Brazil 7158675aa8 Add back continue.
Accidentally removed in
15a931dbdb
2017-10-09 19:44:03 +01:00
Brian Brazil 1545842704 TrimPrefix removes a prefix, TrimLeft removes chars 2017-10-09 19:44:03 +01:00
Brian Brazil ee88f0d222 Ensure all values are used or _ 2017-10-09 19:44:03 +01:00
Brian Brazil 8740fcc657 Use panic in goroutine in test, not t.Fatalf 2017-10-09 19:44:03 +01:00
Fabian Reinartz d7cd5b21ea Merge pull request #169 from prometheus/muchfasterwal
wal: parallelize sample processing
2017-10-09 18:22:41 +02:00
Mathieu Pasquet 38afa507bb Provide better errors messages in commandline
Instead or only printing the help message, which is not always helpful.
For example, when upgrading from prometheus v1, the retention time value
format has changed and now only accepts one unit (e.g. "15d") where it
previously allowed more complex strings (e.g. "360h0m0s").

This commit provides the error message as an explanation for the parsing
failure.
2017-10-09 16:25:50 +02:00
Fabian Reinartz 7efb830d70 wal: parallelize sample processing 2017-10-09 15:22:38 +02:00
Brian Brazil 37ec2d5283 Fix off by one error in concreteSeriesSet (#3262) 2017-10-09 13:37:58 +01:00
Fabian Reinartz 963a270885 Merge pull request #170 from simonpasquier/fix-typo-in-variable-names
Fix innocuous typo in variable names
2017-10-09 12:38:53 +02:00
Simon Pasquier e858c0826c Fix innocuous typo in variable names
This change fixes the variable names holding the tsdb_head_max_time and
tsdb_head_min_time metrics. It is a cosmetic change to improve the
code readability as the metric values are taken from the correct
variables.
2017-10-09 12:24:53 +02:00
Fabian Reinartz abf7c975c9 Merge branch 'master' into dev-2.0 2017-10-07 13:37:21 +02:00
Björn Rabenstein 3569eef8b1 Merge pull request #3260 from prometheus/beorn7/release
Cut v1.8.0
2017-10-07 00:08:01 +02:00
beorn7 5829e4880d Cut v1.8.0 2017-10-06 22:13:36 +02:00
Björn Rabenstein 6bfc8f094c Merge pull request #3259 from prometheus/beorn7/web
Only respond to API requests once the server is ready
2017-10-06 18:41:11 +02:00
beorn7 f20e6a0ae4 Only respond to API requests once the server is ready 2017-10-06 17:20:20 +02:00
Björn Rabenstein 5fad671af9 Merge pull request #3257 from prometheus/beorn7/storage2
Avoid blocking in the logThrottling loop
2017-10-06 14:55:16 +02:00
Fabian Reinartz d3682d701c wal: decode and process in separate threads. 2017-10-06 14:46:52 +02:00
Fabian Reinartz dc87103807 Merge pull request #166 from prometheus/batchpostings
Load postings in batch on startup
2017-10-06 14:41:23 +02:00
beorn7 2fad91d25a Avoid blocking in the logThrottling loop
The timer semantics is really hard. The simple pattern as given in the
godoc for the time package assumes we are not elsewhere consuming from
the timer's channel. However, exactly that can happen here with the
right sequence of events. Thus, we have to drain the channel only if
it has something to drain.
2017-10-06 14:19:30 +02:00
Fabian Reinartz 74b0336d06 Merge pull request #167 from simonpasquier/instrument-wal-corruptions
Instrument WAL corruptions
2017-10-06 14:16:41 +02:00
Simon Pasquier 3e17cd1621 Instrument WAL corruptions 2017-10-06 13:50:20 +02:00
Björn Rabenstein a5412cfc59 Merge pull request #3252 from LK4D4/proper_reset
[storage/local] fix timer.Reset usage
2017-10-06 13:31:07 +02:00
Jack Neely 128b31d058 Log failure to send NaN values to remote store as Debug (#3235)
This was a warning and can be a frequent occurrence.  Let's not fill up
logs unless we are asked to.
2017-10-06 11:22:55 +01:00
Marc Sluiter 6a633eece1 Added go-conntrack for monitoring http connections (#3241)
Added metrics for in- and outgoing traffic with go-conntrack.
2017-10-06 11:22:19 +01:00
Fabian Reinartz cd2e26b7fc Load postings in batch on startup
This allows to insert IDs to postings out of order until
a trigger function is called. This avoids the insertion sort we usually
do which can be very costly since WAL entries are more out of order than
regular adds.
2017-10-06 10:39:10 +02:00
Alexander Morozov 7e814ada72 [storage/local] fix timer.Reset usage
According to https://golang.org/pkg/time/#Timer.Reset you must not rely
on a returned value from Reset.

Signed-off-by: Alexander Morozov <lk4d4math@gmail.com>
2017-10-05 15:48:03 -07:00
Julien Levesy 26a067b23d use testutil assertion helpers in web package testsuite 2017-10-05 22:40:10 +02:00
Julien Levesy 332910d02d import assertion helpers in testutil 2017-10-05 22:22:40 +02:00
Goutham Veeramachaneni 012e52e3f9 Merge pull request #3248 from Gouthamve/release-rc1
*: release v2.0.0-rc.0
2017-10-05 20:07:14 +05:30
Goutham Veeramachaneni 7779d34877
*: release v2.0.0-rc.0
Signed-off-by: Goutham Veeramachaneni <cs14btech11014@iith.ac.in>
2017-10-05 19:45:21 +05:30
Fabian Reinartz 748d392a7a vendor: remove unused dependencies 2017-10-05 15:08:24 +02:00
Fabian Reinartz f52248269e vendor: update prometheus/tsdb 2017-10-05 14:38:39 +02:00
Fabian Reinartz 7a3261aa99 Merge pull request #3240 from Gouthamve/fix-admin-api
web/api: Fix typo which broke the 2.0 admin APIs.
2017-10-05 14:33:12 +02:00
Fabian Reinartz 46dc7e356a Merge pull request #3243 from prometheus/mergemaster
Merge master into dev-2.0
2017-10-05 14:32:52 +02:00
Brian Brazil 99905f82a6 Remove keep_common modifier.
See #3060
2017-10-05 13:27:48 +01:00
Brian Brazil b2ac3d2d86 Remove count_scalar and drop_common_labels.
For #3060
2017-10-05 13:27:48 +01:00
Brian Brazil 67274f0794 Remove 4 interval staleness heuristic. (#3244)
This means that if there is no stale marker, only the usual staleness
delta (5m) applies.

It has occured to me that there is an oddity in the heurestic. It works
fine as long as you have 2 points within the last 5m, but breaks down
when the time window advances to the point where you have just 1 point.

Consider you had points at t=0 and t=10. With the heurestic it goes stale
at t=51, up until t=300. However from t=301 until t=310 we only
see the t=10 point and the series comes back to life. That is not
desirable.

I don't see a way to keep this form of heurestic working given this
issue, so thus I'm removing it.
2017-10-05 12:55:14 +01:00
Bryan Boreham a03193232a Don't disable HTTP keep-alives for remote storage connections. (#3173)
Removes configurability introduced in #3160 in favour of hard-coding,
per advice from @brian-brazil.
2017-10-05 12:32:24 +01:00
Fabian Reinartz 2d0b8e8b94 Merge branch 'master' into dev-2.0 2017-10-05 13:09:18 +02:00
Goutham Veeramachaneni 35aaa2002d
web/api: Add tests for v2 admin API
Signed-off-by: Goutham Veeramachaneni <cs14btech11014@iith.ac.in>
2017-10-05 15:25:09 +05:30
Goutham Veeramachaneni 4a7c39d9d8 Merge pull request #160 from dim/fix/snapshot-test
Restore snapshot functionality
2017-10-05 12:57:10 +05:30
Fabian Reinartz 27f1b8aac3 Merge pull request #162 from BasPH/fsync-duration
Instrument WAL fsync
2017-10-05 08:18:36 +02:00