Commit graph

7110 commits

Author SHA1 Message Date
Fabian Reinartz 3635569257 Trigger reload correctly on interrupted compaction 2017-03-20 10:41:43 +01:00
Fabian Reinartz 2c999836fb Add Queryable interface to Block
This adds the Queryable interface to the Block interface. Head and
persisted blocks now implement their own Querier() method and thus
isolate customization (e.g. remapPostings) more cleanly.
2017-03-20 10:21:21 +01:00
Fabian Reinartz 11be2cc585 Add composed Block interfaces, remove head generation
This adds more lower-leve interfaces which are used to compose
to different Block interfaces.
The DB only uses interfaces instead of explicit persistedBlock and
headBlock. The headBlock generation property is dropped as the use-case
can be implemented using block sequence numbers.
2017-03-20 09:02:36 +01:00
Fabian Reinartz 0958c83d5d Merge pull request #2511 from prometheus/fix-go-build
Only truncate buildVersion if it's set
2017-03-20 08:46:57 +01:00
Julius Volz 107c33545b Don't truncate build version 2017-03-19 18:37:23 +01:00
Goutham Veeramachaneni 761e4768f3
Lint and Vet Fixes 2017-03-19 21:35:01 +05:30
Goutham Veeramachaneni df7db4ac07
Update kit/log To New API
NewContext has been removed couple of weeks back.
Ref: https://github.com/go-kit/kit/releases/tag/v0.4.0
2017-03-19 21:03:09 +05:30
Fabian Reinartz 303a4ec3bc Sync directory on retention delation 2017-03-19 13:50:35 +01:00
Goutham Veeramachaneni 5c89cec65c Stricter Relabel Config Checking for Labeldrop/keep (#2510)
* Minor code cleanup

* Labeldrop/Labelkeep Now *Only* Support Regex

Ref promtheus/prometheus#2368
2017-03-18 22:32:08 +01:00
Robson Roberto Souza Peixoto cc3e859d9e Add support for multiple ports in Marathon (#2506)
- create a target for every port
- add meta labels for Marathon labels in portMappings and portDefinitions
2017-03-18 22:10:44 +02:00
yklausz 75880b594f Adding consul capability to connect via tls 2017-03-17 22:37:18 +01:00
Fabian Reinartz c389193b37 Merge branch 'master' into dev-2.0 2017-03-17 16:27:07 +01:00
Fabian Reinartz b586781283 *: update tsdb vendoring and add retention flag 2017-03-17 16:06:04 +01:00
Fabian Reinartz 863d38dfee Fix unreturned lock 2017-03-17 15:56:19 +01:00
Fabian Reinartz d0770302ed Add retention deletion 2017-03-17 15:30:05 +01:00
Fabian Reinartz 4962175218 Fix deadlock between heads and headmtx
With hundreds of concurrent appenders the locking order between the
headBlocks on instantiating appenders and write locking the headmtx
is hard to impossible to get consistent.
Just never instantiate appenders while holding the headmtx lock in any
way.
2017-03-17 14:10:18 +01:00
Fabian Reinartz 65b846ae5b Remove unreturned locks, detect writes on closed heads 2017-03-17 12:12:50 +01:00
Fabian Reinartz e0b33a7a28 Remove leftover signaling channels from headBlock 2017-03-17 10:16:55 +01:00
Fabian Reinartz 51ea34d381 Fix label sorting benchmark 2017-03-17 10:07:10 +01:00
Fabian Reinartz 0a7c8e9da1 Merge pull request #2504 from prometheus/grobie/fix-discovery-naming
Follow golang naming conventions in discovery packages
2017-03-17 08:01:48 +01:00
Tobias Schmidt 7bde44e98e Remove testing.T usage in goroutines
The staticcheck warns about testing.T usage in goroutines. Moving the
t.Fatal* calls to the main thread showed immediately that this is a good
practice, as one of the test setups didn't work.
2017-03-16 23:40:46 -03:00
Tobias Schmidt 58cd39aacd Follow golang naming conventions in discovery packages 2017-03-16 23:40:46 -03:00
Bplotka 1823ae8bc4 Fixed int64 overflow for timestamp in v1/api parseDuration and parseTime (#2501)
* Fixed int64 overflow for timestamp in v1/api parseDuration and parseTime

This led to unexpected results on wrong query with "(...)&start=148966367200.372&end=1489667272.372"
That query is wrong because of `start > end` but actually internal int64 overflow caused start to be something around MinInt64 (huge negative value) and was passing validation.

BTW: Not sure if negative timestamp makes sense even.. But model.Earliest is actually MinInt64, can someone explain me why?

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

* Added missing trailing periods on comments.

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

* MOved to only `<` and `>`. Removed equal.

Signed-off-by: Bartek Plotka <bwplotka@gmail.com>
2017-03-16 15:16:20 +01:00
beorn7 48d221c11e storage: Fix typo in comment 2017-03-16 11:49:41 +01:00
Fabian Reinartz 9a9e46611e Merge branch 'master' of github.com:fabxc/tsdb 2017-03-15 14:46:01 +01:00
Fabian Reinartz 34efe4e2c8 Drop position mapper from head block
The position mapper was intended to pre-computed "expensive" ordering
of label sets. It was expensive to update and caused a lot of trouble.
Skipping this optimization entirely actually revelead it was pointless
and even harmful from the e2e perspective.
2017-03-15 14:44:29 +01:00
Fabian Reinartz ad5812d83a Handle WAL corruption by truncating
This adds handling for various corruption scenarios of the WAL.
If corruption is encountered, we truncate the WAL after the last valid
entry transparently and continue appending after the offset.
2017-03-15 11:16:16 +01:00
Robert Neumayer feb7670929 Add tests for consul service discovery (#2490)
* Add tests for consul service discovery

* Add license header

* Address comments

* inline variables
* check for extra error

* Fix error formatting
2017-03-15 09:33:53 +01:00
Fabian Reinartz 04bb006e2b Handle WAL corruption by truncating
This adds handling for various corruption scenarios of the WAL.
If corruption is encountered, we truncate the WAL after the last valid
entry transparently and continue appending after the offset.
2017-03-14 19:30:23 +01:00
Fabian Reinartz a8e8903350 Use ChunkMeta references for clarity
This has been a common source of hard to debug issues. Its a premature
and unbenchmarked optimization and semantically, we want ChunkMetas to
be references in all changed cases.
2017-03-14 15:40:16 +01:00
Fabian Reinartz d6fb6aaaa8 Rename paritionSeriesSet to mergedSeriesSet 2017-03-14 15:24:08 +01:00
Fabian Reinartz 0ecd205794 promql: Use buffer pool for matrix allocations 2017-03-14 10:57:34 +01:00
Fabian Reinartz e825a0b40c Make mapper updates asynchronous 2017-03-14 10:57:00 +01:00
Tom Wilkie 75bb0f3253 Review feedback 2017-03-13 21:24:49 +00:00
Tom Wilkie 77cce900b8 Fix tests 2017-03-13 15:21:59 +00:00
Tom Wilkie b48799a01e Add license stanza 2017-03-13 14:50:15 +00:00
Tom Wilkie 9d22f030cf Dynamically reshard the QueueManager based on observed load. 2017-03-13 14:41:16 +00:00
Wéber Gyula 5aa90c075b added docker run command to readme (#2491)
* added docker run command to readme

* updated codebox in readme
2017-03-13 11:37:25 +01:00
Fabian Reinartz de1e4322d7 Merge pull request #2474 from Gouthamve/custom-timeouts-1399
Support Custom Timeout for Queries
2017-03-12 14:20:59 +01:00
Fabian Reinartz b09b90a940 Correctly close querier on error, revendor tsdb 2017-03-09 15:40:52 +01:00
Fabian Reinartz 32c32013a6 Fix loading of persisted blocks 2017-03-09 15:40:13 +01:00
Fabian Reinartz 5876a3303c Add test for Index postings querying 2017-03-09 09:39:30 +01:00
Fabian Reinartz d3edfb5540 Test multiple full write/restore cylcles in WAL 2017-03-08 21:02:08 +01:00
Fabian Reinartz 3abf54c660 Merge branch 'dev-2.0-compact' into dev-2.0 2017-03-08 17:01:32 +01:00
Fabian Reinartz f160c4eb20 vendor: integrate various tsdb fixes 2017-03-08 16:54:48 +01:00
Fabian Reinartz ca1bc920b7 Test updates 2017-03-08 16:54:13 +01:00
Fabian Reinartz cb4dde7659 Fix WAL log recovery bug
This fixes a bug where the last WAL file was closed after consuming it
instead of being left open for further writes.
Reloading of blocks on startup considers loading head blocks now.
2017-03-08 16:53:07 +01:00
Fabian Reinartz 5ec1efe622 retrieval: fix test 2017-03-08 15:37:12 +01:00
Fabian Reinartz 2677f3eaf2 Merge pull request #2462 from m-kraus/master
Allow the use of bearer_token or bearer_token_file for MarathonSD authorization
2017-03-08 10:33:26 +01:00
Julius Volz e22553edd2 Merge pull request #2468 from agaoglu/version-statics
Adding version to names of static files
2017-03-07 22:22:01 +01:00