Commit graph

482 commits

Author SHA1 Message Date
Fabian Reinartz dc0fb2b585 Merge pull request #54 from prometheus/query-test
Test we get back out the data we put in.
2017-04-21 15:15:55 +02:00
Brian Brazil 2742fc380b Test we get back out the data we put in.
This also adds a utility that'll aid future tests.
2017-04-21 14:10:14 +01:00
Fabian Reinartz 2fcdd1a5cb Merge pull request #53 from prometheus/atomicity
Remove dead code.
2017-04-20 16:41:32 +02:00
Brian Brazil 0e1f72dca6 Merge pull request #55 from prometheus/branch-hack
Hack to workaround dependency on non-master code.
2017-04-20 15:18:09 +01:00
Brian Brazil 1d83746cc5 Hack to workaround dependency on non-master code. 2017-04-20 14:47:08 +01:00
Brian Brazil 72443bddfc Remove dead code. 2017-04-20 13:45:07 +01:00
Brian Brazil d04bd947ea Merge pull request #51 from prometheus/rollback
Make rollback actually rollback.
2017-04-19 11:29:03 +01:00
Brian Brazil dba222b53c Make rollback actually rollback.
Also add tests for basic commit/rollback
functionality.

Fixes #39
2017-04-19 11:28:36 +01:00
Fabian Reinartz 46c947d94f Merge pull request #45 from mattbostock/document_appender_not_goroutine_safe
db: Add comment: Appender not goroutine safe
2017-04-17 12:12:20 +02:00
Fabian Reinartz 72dd055cde Merge pull request #46 from mattbostock/patch-1
db: Fix typo: reference
2017-04-17 12:12:06 +02:00
Matt Bostock 4d5ca4b9c1 db: Fix typo: reference 2017-04-14 22:02:06 +01:00
Matt Bostock 3dd5a4ee09 db: Add comment: Appender not goroutine safe 2017-04-14 21:39:08 +01:00
Goutham Veeramachaneni 239f8b9eb5
Modify tests to check for mint, maxt
Signed-off-by: Goutham Veeramachaneni <cs14btech11014@iith.ac.in>
2017-04-14 00:37:21 +05:30
Goutham Veeramachaneni b60c2068bc
Make blockQuerier return data in valid time-range
Fixes #43

Added mint, maxt to chunkSeriesIterator. Adding a field there is
inevitable as something similar is required for ignoring deleted
time-ranges.

Signed-off-by: Goutham Veeramachaneni <cs14btech11014@iith.ac.in>
2017-04-14 00:36:14 +05:30
Goutham Veeramachaneni b9868c9f0b
Initial test for blockQuerier
Signed-off-by: Goutham Veeramachaneni <cs14btech11014@iith.ac.in>
2017-04-13 19:57:31 +05:30
Fabian Reinartz 25d4546518 Merge pull request #42 from prometheus/amend-nan
When checking for amended points, do it in terms of bits.
2017-04-13 08:53:02 +02:00
Brian Brazil bceb5c1b16 When checking for amended points, do it in terms of bits.
NaN != NaN, so the previous code would incorrectly report
it as changed.

There's also plans to take advantage of the NaN payload,
so look at the entire value.
2017-04-12 16:25:32 +01:00
Fabian Reinartz 3a2f6ee305 Add license file 2017-04-10 21:02:42 +02:00
Fabian Reinartz 778103b450 Add liecence file and headers 2017-04-10 20:59:45 +02:00
Fabian Reinartz 875e2dcb1e Add README 2017-04-10 13:29:46 +02:00
Goutham Veeramachaneni 0c5c4f07c5
Test "Stitching" SeriesIterators
Signed-off-by: Goutham Veeramachaneni <cs14btech11014@iith.ac.in>
2017-04-09 19:45:22 +05:30
Goutham Veeramachaneni f8a8b77976
postings: Fix bad test and revert changed logic
A bad test was introduced a couple of commits ago which also made
changes to pass the bad test. Fixed the test and revert the changes.

Signed-off-by: Goutham Veeramachaneni <cs14btech11014@iith.ac.in>
2017-04-09 17:20:39 +05:30
Fabian Reinartz 721df536eb Activate Travis CI 2017-04-09 10:18:19 +02:00
Goutham Veeramachaneni 86929ed090
Added Test For indexReader.LabelValues
Signed-off-by: Goutham Veeramachaneni <cs14btech11014@iith.ac.in>
2017-04-08 21:12:04 +05:30
Goutham Veeramachaneni 329dc1fa6c
Add Tests For mergedPostings.Seek
* Renamed mergedPostings to make it consistent across the repo
* Fixed bug with Seek
* Added Tests for Seek

Signed-off-by: Goutham Veeramachaneni <cs14btech11014@iith.ac.in>
2017-04-08 20:42:29 +05:30
Fabian Reinartz c73a397da2 Adjust maximum samples per chunk. 2017-04-07 10:58:37 +02:00
Goutham Veeramachaneni a51b2666d7 Fix Panic When Accessing Uncut memorySeries
When calling AddFast, we check the details of the head chunk of the
referred memorySeries. But it could happen that there are no chunks in
the series at all.

Currently, we are deferring chunk creation to when we actually append
samples, but we can be sure that there will be samples if the series is
created. We will be consuming no extra memory by cutting a chunk when we
create the series.

Ref: #28 comment 2

Signed-off-by: Goutham Veeramachaneni <cs14btech11014@iith.ac.in>
2017-04-06 00:22:31 +05:30
Fabian Reinartz 7de2217011 Add fast-path for equality matching 2017-04-05 15:37:48 +02:00
Fabian Reinartz 1579e12011 Add cross-platform mmap 2017-04-04 16:54:48 +02:00
Fabian Reinartz 10c7c9acbe Adjust import names to new repository organisation 2017-04-04 11:27:26 +02:00
Fabian Reinartz 767b88a3a5 Parallelize commits to prevent deadlocks
This parallelizes commits to prevent deadlocks across inconsistently
locked heads. As commits are currently not fully atomic across
heads, this does decrease our guarantees.
2017-04-04 11:21:19 +02:00
Fabian Reinartz 1afd8080f7 Merge pull request #27 from Gouthamve/master
Add mockIndex And Refactor Tests To Use That
2017-03-31 13:53:02 +02:00
Goutham Veeramachaneni 71e05a22c7
Add mockIndex And Refactor Tests To Use That 2017-03-30 04:48:41 +05:30
Fabian Reinartz fda8969f51 Merge pull request #23 from Gouthamve/18-bytes-iterator
Implement Postings Iterator Over Bytes
2017-03-29 13:17:05 +02:00
Fabian Reinartz 87d48bf9de Merge branch 'master' of github.com:fabxc/tsdb 2017-03-27 19:07:27 +02:00
Fabian Reinartz a52980e0a8 Add workaround for deadlocks
This adds a workaround to avoid deadlocks for inconsistent write lock
order across headBlocks.
Things keep working if transactions only append data for the same
timestamp, which is generally the case for Prometheus.

Full behavior should be restored in a subsequent change.
2017-03-27 19:05:34 +02:00
Goutham Veeramachaneni 141499ff19
Add Tests For bigEndianPostings 2017-03-27 15:46:55 +05:30
Goutham Veeramachaneni 7b94a4e17d
Rename bytePostings To bigEndianPostings
* To be more specific about the contents of the byte slice.
2017-03-27 14:04:42 +05:30
Fabian Reinartz 6a87e1a926 Merge pull request #22 from Gouthamve/master
Add Sample Back
2017-03-27 09:55:55 +02:00
Goutham Veeramachaneni efb0dfe1be
Implement Postings Iterator Over Bytes
Closes fabxc/tsdb#18
2017-03-26 23:40:12 +05:30
Goutham Veeramachaneni 61f866bb94
Add Sample Back
The compilation and tests are broken as head.go requires sample which
has been moved to another package while moving BufferedSeriesIterator.

Duplication seemed better compared to exposing sample from tsdbutil.
2017-03-26 23:22:58 +05:30
Fabian Reinartz 3be4ef94ce Move BufferedSeriesIterator in own package
This functionality is useful for a lot of clients but not relevant to
the TSDB's core features.
2017-03-24 13:23:32 +01:00
Fabian Reinartz f85d89abc0 Move BufferedSeriesIterator in own package
This functionality is useful for a lot of clients but not relevant to
the TSDB's core features.
2017-03-24 10:20:39 +01:00
Fabian Reinartz e478d0e3bc Actually close olds blocks in reloadBlocks
This fixes a bug leaking memory because blocks were not actually closed
as the closing call references the initial, empty slice
2017-03-23 18:27:20 +01:00
Fabian Reinartz 70909ca8ad Ensure GC runs after each compactor call
GC is triggered rarely, which may cause unnecessarily high memory
spikes when running several compaction cycles in a row. Explicitly run
GC so we don't have idle bytes marked as used from the previous cycle.
2017-03-21 12:21:02 +01:00
Fabian Reinartz 789e8224ff Fix wrong comparison in head block resorting 2017-03-21 12:12:33 +01:00
Fabian Reinartz 55ee4b5b3b Merge branch 'master' of github.com:fabxc/tsdb 2017-03-21 10:11:39 +01:00
Fabian Reinartz c18e055d7c Fix races and add comments on remaining ones 2017-03-21 10:11:23 +01:00
Fabian Reinartz d3669bd8b1 Merge pull request #15 from Gouthamve/lint-vet
Lint and Vet Fixes
2017-03-21 09:58:45 +01:00
Fabian Reinartz a4be181d3c Merge branch 'master' into lint-vet 2017-03-21 09:58:34 +01:00