Commit graph

568 commits

Author SHA1 Message Date
Fabian Reinartz b4d093a8a7
Merge pull request #201 from prometheus/grobie/fix-typo-in-metric
Fix typo in prometheus_tsdb_reloads_failures_total description
2017-11-09 13:27:12 +00:00
Tobias Schmidt 5170198276 Fix typo in prometheus_tsdb_reloads_failures_total description 2017-11-09 14:25:27 +01:00
Fabian Reinartz 1bacdf8e33
Merge pull request #198 from dswarbrick/master
Use Go 1.9 math/bits funcs for counting leading / trailing zeros
2017-11-08 23:31:49 +00:00
Daniel Swarbrick 57cefba0d5 Move to Go 1.9 2017-11-08 23:26:51 +01:00
Daniel Swarbrick 0585ab3fcd Use Go 1.9 math/bits implementation for counting leading / trailing zeros 2017-11-08 23:18:33 +01:00
Fabian Reinartz 7337c6a513
Merge pull request #196 from prometheus/grobie/fix-metric-prefix
Fix missing prefix of tsdb_wal_* metrics
2017-11-08 13:59:39 +00:00
Tobias Schmidt 6027af95ca Fix missing prefix of tsdb_wal_* metrics 2017-11-08 14:58:03 +01:00
Fabian Reinartz 706602daed
Merge pull request #195 from prometheus/delblocks
db: delete old blocks during reload
2017-11-04 08:45:56 +01:00
Fabian Reinartz d226411a2a db: delete old blocks during reload
Windows requires blocks to be closed before deleting their directories.
This adds a set of deleteable blocks to reload(), which then deletes
them without causing disruption to querying.
2017-11-03 20:41:24 +01:00
Fabian Reinartz 296faccf2f
Merge pull request #193 from ranbochen/fix-#191
Fix #191
2017-11-03 20:20:01 +01:00
Nipun Talukdar 791a2dda4d Fixed a problem of adding padding of 4 zero bytes in some cases (#194)
* Fixed a problem of adding padding of 4 zero bytes in some cases

* Incorporated review comments
2017-11-03 20:16:19 +01:00
Fabian Reinartz b1df857819
Merge pull request #190 from prometheus/walsync
wal: synchronize background operations
2017-11-01 18:11:22 +01:00
Fabian Reinartz a993f0ccc0
Fix typo 2017-11-01 18:11:09 +01:00
Your Name 4a4a706234 close blocks which will be remove 2017-11-02 00:30:19 +08:00
ranbochen a27cf34a36 fix bugs on platform windows to pass all test case. (#192)
* fix bugs on platform windows to pass all test case.

* fix bugs on platform windows to pass all test case

* clean up codes
2017-10-31 15:37:41 +01:00
ranbo chen 19340a382d clean up codes 2017-10-31 21:08:56 +08:00
ranbo chen 90de381cdb fix bugs on platform windows to pass all test case 2017-10-31 20:38:32 +08:00
ranbo chen b82b2d0c1b fix bugs on platform windows to pass all test case. 2017-10-31 20:07:29 +08:00
Fabian Reinartz 8aedb7671e wal: synchronize background operations
This adds an actor channel and thereby serializes all background
operations through the run() method.
Fixes an existing race.
2017-10-30 09:50:21 +01:00
Oren Shomron 6ca5e52b69 Typo in prometheus_tsdb_head_samples_appended_total description (#188) 2017-10-25 19:12:18 +01:00
Fabian Reinartz 5d28c849c7 Merge pull request #187 from prometheus/cutchunk
Ensure near-empty chunks end at correct boundary
2017-10-25 16:52:11 +02:00
Fabian Reinartz 82796db37b Ensure near-empty chunks end at correct boundary
We were determining a chunk's end time once it was one quarter full to
compute it so all chunks have uniform number of samples.
This accidentally skipped the case where series started near the end of
a chunk range/block and never reached that threshold. As a result they
got persisted but were continued across the range.

This resulted in corrupted persisted data.
2017-10-25 09:51:55 +02:00
Fabian Reinartz d109149d17 Merge pull request #186 from prometheus/closeallblocks
Ensure readers are closed on setup failure.
2017-10-25 09:31:06 +02:00
Fabian Reinartz c93162c751 Merge pull request #185 from prometheus/walslice
Limit WAL sample processing batch size
2017-10-25 09:30:52 +02:00
Fabian Reinartz 820bd8b170 Merge pull request #181 from prometheus/gcchunk
Fix dangling chunk reference panic
2017-10-25 09:30:16 +02:00
Fabian Reinartz 6ecdaa5314 Merge pull request #183 from prometheus/walbrokensegment
Truncate segments on broken header
2017-10-25 09:27:44 +02:00
Fabian Reinartz 7bc07d80b6 Merge pull request #180 from prometheus/fixbugz
Fix race in symbol table re-creation
2017-10-24 11:39:13 +02:00
Fabian Reinartz f8e88bfdb7 Close previous block queriers on error
This ensures we close all previously opened queriers if on of the block
querier fails to open.
Also swap in new blocks before closing old ones to avoid the situation
in general. Make read locking of blocks more conservative to avoid
unnecessary retries by clients, e.g. when blocks are getting closed
before we can successfully instantiate querier against them.
2017-10-23 21:56:12 +02:00
Fabian Reinartz 9749aa2a3e head: limit WAL sample processing batch size 2017-10-23 16:22:24 +02:00
Fabian Reinartz 80055bb95b Truncate segments on broken header 2017-10-20 13:16:44 +02:00
Fabian Reinartz 9e999e8b0b Merge pull request #184 from prometheus/metricprefix
Prefix all metrics with `prometheus_*`
2017-10-20 13:01:15 +02:00
Fabian Reinartz d17104f1f0 Prefix all metrics with prometheus_* 2017-10-20 12:32:32 +02:00
Fabian Reinartz ea817e169b Return nop iterator for invalid chunk references 2017-10-20 09:43:52 +02:00
Fabian Reinartz 6dcca97755 Fix race in symbol table re-creation 2017-10-20 09:29:03 +02:00
Fabian Reinartz ebdc0f4a61 Merge pull request #179 from prometheus/tabw
Remove GetTabWriter from tsdb package
2017-10-20 08:51:07 +02:00
Fabian Reinartz e59b7b8ac4 Remove prometheus/prometheus dev-2.0 branch workaround 2017-10-19 18:24:12 +02:00
Fabian Reinartz 6a10761b50 Remove GetTabWriter from tsdb package 2017-10-19 18:14:37 +02:00
Fabian Reinartz 7f8fa07cf7 Merge pull request #176 from prometheus/races
Races
2017-10-12 15:27:08 +02:00
Fabian Reinartz efe9509d04 Merge pull request #175 from prometheus/seriesnotfound
Clarify postings index semantics, handle staleness
2017-10-12 15:22:44 +02:00
Fabian Reinartz 065f42f58c head: track number of series not found errors in metric 2017-10-12 15:25:12 +02:00
Fabian Reinartz 91a154d228 Fix block printing in cmd/main 2017-10-11 11:02:57 +02:00
Fabian Reinartz 88305e7612 Access chunk time range while holding lock 2017-10-11 10:17:59 +02:00
Fabian Reinartz 106eaf39d1 Ensure workers terminated fully before reading unknownRefs 2017-10-11 10:12:29 +02:00
Fabian Reinartz 665955da48 Clarify postings index semantics, handle staleness
The postings list index may point to series that no longer
exist during garbage collection. This clarifies that this is valid
behavior.
It would be possible, though more complex, to always keep them in sync.
However, series existance means nothing in itself as the queried time
range defines whether there's actual data. Thus our definition is sane
overall as long as drift is kept small.
2017-10-11 09:37:19 +02:00
Fabian Reinartz 6e94145515 Merge pull request #156 from BasPH/cli-ls
Add list blocks command to CLI
2017-10-11 09:22:41 +02:00
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 d7cd5b21ea Merge pull request #169 from prometheus/muchfasterwal
wal: parallelize sample processing
2017-10-09 18:22:41 +02:00
Fabian Reinartz 7efb830d70 wal: parallelize sample processing 2017-10-09 15:22:38 +02:00