Go to file
Goutham Veeramachaneni 2fa647f50b Fix missing postings in Merge and Intersect (#77)
* Test for a previous implematation of Intersect

Before we were moving the postings list everytime we create a new
chained `intersectPostings`. That was causing some postings to be
skipped. This test fails on the older version.

Signed-off-by: Goutham Veeramachaneni <cs14btech11014@iith.ac.in>

* Advance on Seek only when valid.

Issue:
Before in mergedPostings and others we advance everytime we `Seek`,
which causes issues with `Intersect`.

Take the case, where we have a mergedPostings = m merging, a: {10, 20, 30} and
b: {15, 25, 35}. Everytime we `Seek`, we do a.Seek and b.Seek.

Now if we Intersect m with {21, 22, 23, 30}, we would do Seek({21,22,23}) which
would advance a and b beyond 30.

Fix:
Now we advance only when the seeking value is greater than the current
value, as the definition specifies.

Also, posting 0 will not be a valid posting and will be used to signal
finished or un-initialized PostingsList.

Signed-off-by: Goutham Veeramachaneni <cs14btech11014@iith.ac.in>

* Add test for Merge+Intersect edgecase.

Signed-off-by: Goutham Veeramachaneni <cs14btech11014@iith.ac.in>

* Add comments to trivial tests.

Signed-off-by: Goutham Veeramachaneni <cs14btech11014@iith.ac.in>
2017-05-12 09:44:41 +02:00
Documentation/format Documentation fixes 2017-05-02 14:16:44 +02:00
chunks Also add original license info to bstream.go 2017-05-03 01:32:09 +02:00
cmd/tsdb Add liecence file and headers 2017-04-10 20:59:45 +02:00
labels Simplify Labels.Equals() 2017-04-28 16:01:37 +02:00
test Add liecence file and headers 2017-04-10 20:59:45 +02:00
testdata Add full encode/decode WAL cycle test 2017-02-14 21:55:50 -08:00
tsdbutil Minor comment fixes and additions. 2017-04-28 15:41:42 +02:00
.travis.yml Hack to workaround dependency on non-master code. 2017-04-20 14:47:08 +01:00
LICENSE Add license file 2017-04-10 21:02:42 +02:00
README.md Add README 2017-04-10 13:29:46 +02:00
block.go Merge pull request #65 from prometheus/comment-fixes 2017-04-28 16:07:16 +02:00
chunks.go Documentation fixes 2017-05-02 14:16:44 +02:00
chunks_test.go Merge pull request #36 from Gouthamve/tests 2017-04-24 10:50:59 +02:00
compact.go Add liecence file and headers 2017-04-10 20:59:45 +02:00
db.go Allow disabling lock file 2017-05-09 12:52:47 +02:00
db_test.go Fix and test ref handling in DB appender 2017-04-28 15:24:28 +02:00
db_unix.go Add liecence file and headers 2017-04-10 20:59:45 +02:00
db_windows.go Add liecence file and headers 2017-04-10 20:59:45 +02:00
encoding_helpers.go Migrate last IndexWriter pieces to decbuf 2017-04-30 10:18:07 +02:00
head.go Fix missing postings in Merge and Intersect (#77) 2017-05-12 09:44:41 +02:00
head_test.go Merge pull request #75 from Gouthamve/head-gen 2017-05-05 18:56:53 +02:00
index.go Add padding between fixed-sized index sections 2017-05-02 12:43:51 +02:00
index_test.go Move chunk checksum 2017-04-30 10:10:18 +02:00
postings.go Fix missing postings in Merge and Intersect (#77) 2017-05-12 09:44:41 +02:00
postings_test.go Fix missing postings in Merge and Intersect (#77) 2017-05-12 09:44:41 +02:00
querier.go Simply loop away from using tracking variables. 2017-05-05 19:34:59 +05:30
querier_test.go Fix bug where having one chunk can cause panic 2017-05-03 22:45:28 +05:30
wal.go Minor comment fixes and additions. 2017-04-28 15:41:42 +02:00
wal_test.go Add liecence file and headers 2017-04-10 20:59:45 +02:00

README.md

TSDB

This repository contains the new Prometheus storage layer that will be used in its 2.0 release.

A writeup of its design can be found here.