johncming
28ca0965f0
tsdb/chunkenc: fix typo of return error. ( #7670 )
...
* tsdb/chunkenc: fix typo of return error.
Signed-off-by: johncming <johncming@yahoo.com>
* tsdb: fix typo of function in markdonw.
Signed-off-by: johncming <johncming@yahoo.com>
4 years ago
Peter Štibraný
1d396b96dc
Specify that returned samples must be ordered by timestamp. ( #6877 )
...
Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
5 years ago
Bartlomiej Plotka
59c9d6ef45
Addressed Brian's comments, moved metrics to main.go
...
Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
5 years ago
Bartlomiej Plotka
5d84e5d895
Make chunkenc.Iterator.At behaviour unspecified without Next done.
...
Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
5 years ago
Bartlomiej Plotka
cfba92a133
Addressed comments.
...
Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
5 years ago
Bartlomiej Plotka
849faa407b
Minor fixes.
...
Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
5 years ago
Bartlomiej Plotka
2cf637fbf5
Addressed comments.
...
Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
5 years ago
Bartlomiej Plotka
34426766d8
Unify Iterator interfaces. All point to storage now.
...
This is part of https://github.com/prometheus/prometheus/pull/5882 that can be done to simplify things.
All todos I added will be fixed in follow up PRs.
* querier.Querier, querier.Appender, querier.SeriesSet, and querier.Series interfaces merged
with storage interface.go. All imports that.
* querier.SeriesIterator replaced by chunkenc.Iterator
* Added chunkenc.Iterator.Seek method and tests for xor implementation (?)
* Since we properly handle SelectParams for Select methods I adjusted min max
based on that. This should help in terms of performance for queries with functions like offset.
* added Seek to deletedIterator and test.
* storage/tsdb was removed as it was only a unnecessary glue with incompatible structs.
No logic was changed, only different source of abstractions, so no need for benchmarks.
Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
5 years ago
Marco Pracucci
699f3e8f4d
Added comments to the Chunk interface
...
Signed-off-by: Marco Pracucci <marco@pracucci.com>
5 years ago
Marco Pracucci
0703dae7cc
Compact TSDB head chunks after being cut, to reduce inuse memory
...
Signed-off-by: Marco Pracucci <marco@pracucci.com>
5 years ago
Ganesh Vernekar
7cf09b0395
Moving tsdb into its own subdirectory
...
Signed-off-by: Ganesh Vernekar <cs15btech11018@iith.ac.in>
5 years ago
Ganesh Vernekar
b1cd829030
Reuse Chunk Iterator ( #642 )
...
* Reset method for chunkenc.Iterator
Signed-off-by: Ganesh Vernekar <cs15btech11018@iith.ac.in>
* Reset method only for XORIterator
Signed-off-by: Ganesh Vernekar <cs15btech11018@iith.ac.in>
* Use Reset(...) in querier.go
Signed-off-by: Ganesh Vernekar <cs15btech11018@iith.ac.in>
* Reuse deletedIterator
Signed-off-by: Ganesh Vernekar <cs15btech11018@iith.ac.in>
* Another way of reusing chunk iterators
Signed-off-by: Ganesh Vernekar <cs15btech11018@iith.ac.in>
* Unexport xorIterator
Signed-off-by: Ganesh Vernekar <cs15btech11018@iith.ac.in>
* Fix memSeries.iterator(...)
Signed-off-by: Ganesh Vernekar <cs15btech11018@iith.ac.in>
* Add some comments
Signed-off-by: Ganesh Vernekar <cs15btech11018@iith.ac.in>
5 years ago
Goutham Veeramachaneni
2ae028114c
Add FromData function (again)! ( #600 )
...
Signed-off-by: Goutham Veeramachaneni <gouthamve@gmail.com>
6 years ago
zhulongcheng
719b57db44
Remove obsolete FromData function ( #540 )
...
Signed-off-by: zhulongcheng <zhulongcheng.me@gmail.com>
6 years ago
Bryan Boreham
74093f0508
Remove pointer indirection on chunk bstream ( #499 )
...
It isn't necessary since the member is never changed after
initialization.
Signed-off-by: Bryan Boreham <bryan@weave.works>
6 years ago
Fabian Reinartz
67f0ca8f0e
Move index and chunk encoders to own packages
7 years ago
Fabian Reinartz
ea817e169b
Return nop iterator for invalid chunk references
7 years ago
Fabian Reinartz
905af27cf9
Refactor compactor
7 years ago
Fabian Reinartz
66ff7b12e9
Pool Chunk objects during compaction
7 years ago
Fabian Reinartz
96d7f540d4
Persist series without allocating the full set
...
Change index persistence for series to not be accumulated in memory
before being written as one large batch. `Labels` and `ChunkMeta`
objects are reused.
This cuts down memory spikes during compaction of multiple blocks
significantly.
As part of the the Index{Reader,Writer} now have an explicit notion of
symbols and series must be inserted in order.
7 years ago
Goutham Veeramachaneni
401bdfd4a6
Make Chunks return the number of samples inside
...
Signed-off-by: Goutham Veeramachaneni <cs14btech11014@iith.ac.in>
7 years ago
Julius Volz
8d1fb4fa01
Minor comment fixes and additions.
8 years ago
Fabian Reinartz
778103b450
Add liecence file and headers
8 years ago
Fabian Reinartz
62b8ded0a5
Rename iterator value getters to At()
8 years ago
Fabian Reinartz
675f0886f0
Append to chunks cannot error
8 years ago
Fabian Reinartz
ce7f4106c2
Reda correct label number, fix buffered iterator panic
8 years ago
Fabian Reinartz
70a0224f19
Change chunk sample number to BigEndian
8 years ago
Fabian Reinartz
40a451694f
Refactor persistence into interfaces
8 years ago
Fabian Reinartz
fa181a34c1
chunks: cleanup anything but xor encoding
...
xor encoding is fast enough for our purposes and provides
very good compression.
We remove all other ones that partially don't support floats
for the sake of simplicity.
8 years ago
Fabian Reinartz
e67cf768dc
chunks: remove intermeidate copy from xor chunk
8 years ago
Fabian Reinartz
7874d28f32
chunks: implement xor encoding
8 years ago
Fabian Reinartz
ae7b18ae34
Add chunk package
8 years ago