Goutham Veeramachaneni
244b73fce1
Rename for clarity and consistency.
...
Misc. changes for code cleanliness.
Signed-off-by: Goutham Veeramachaneni <cs14btech11014@iith.ac.in>
2017-05-22 16:42:36 +05:30
Goutham Veeramachaneni
8434019ad9
Merge branch 'master' into deletes-1
...
Signed-off-by: Goutham Veeramachaneni <cs14btech11014@iith.ac.in>
2017-05-22 12:58:38 +05:30
Goutham Veeramachaneni
0b70333ef6
Add tests for tombstones.
...
Signed-off-by: Goutham Veeramachaneni <cs14btech11014@iith.ac.in>
2017-05-21 23:20:05 +05:30
Goutham Veeramachaneni
3dbb400bef
Initial implementation of Delete on DB.
...
Signed-off-by: Goutham Veeramachaneni <cs14btech11014@iith.ac.in>
2017-05-20 00:35:50 +05:30
Fabian Reinartz
7e6961b4ac
Fix import and var name
2017-05-18 17:30:52 +02:00
Fabian Reinartz
d2673d8659
Completely drop empty blocks
2017-05-18 16:12:17 +02:00
Fabian Reinartz
39df7e2bba
Switch blocks to ULID directories, drop sequenc numbers
2017-05-18 16:09:30 +02:00
Goutham Veeramachaneni
22c1b5b492
Make SeriesSets use tombstones.
...
Signed-off-by: Goutham Veeramachaneni <cs14btech11014@iith.ac.in>
2017-05-17 14:49:42 +05:30
Goutham Veeramachaneni
5579efbd5b
Initial implentation of Deletes on persistedBlock
...
Very much a WIP
Signed-off-by: Goutham Veeramachaneni <cs14btech11014@iith.ac.in>
2017-05-14 14:36:26 +05:30
Fabian Reinartz
778103b450
Add liecence file and headers
2017-04-10 20:59:45 +02:00
Fabian Reinartz
10c7c9acbe
Adjust import names to new repository organisation
2017-04-04 11:27:26 +02:00
Fabian Reinartz
789e8224ff
Fix wrong comparison in head block resorting
2017-03-21 12:12:33 +01:00
Fabian Reinartz
9c93f8f2aa
Fix various races
...
This fixes different race condition encoutnered when running Prometheus.
It reduces the overall performance in the synthetic benchmark a fair bit
but has no indiciations of impacting a real-world setup notably.
2017-03-20 14:45:27 +01:00
Fabian Reinartz
3635569257
Trigger reload correctly on interrupted compaction
2017-03-20 10:41:43 +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
04783831e2
Correctly close compacted blocks.
2017-03-06 09:33:55 +01:00
Fabian Reinartz
21b97d1e04
Fix compaction selection procedure
2017-03-02 15:10:13 +01:00
Fabian Reinartz
327e07e8d0
Properly sync moves and removes in compactor
2017-03-02 14:35:06 +01:00
Fabian Reinartz
92120448c2
Properly cleanup compacted dirs, fixes, docs
2017-03-02 14:32:09 +01:00
Fabian Reinartz
2c3e778d90
Compactor interface
2017-03-02 09:17:30 +01:00
Fabian Reinartz
2c3b56350a
Write meta.json file atomically
2017-03-01 17:19:57 +01:00
Fabian Reinartz
db5c88ea9a
Misc compaction fixes
2017-02-28 08:40:51 +01:00
Fabian Reinartz
306831f151
Add per-block state ULID
2017-02-27 10:46:15 +01:00
Fabian Reinartz
9a5dfadb09
Tweak IndexWriter interface, serialize directly into dir
2017-02-25 07:24:20 +01:00
Fabian Reinartz
78780cd2ba
Segment chunk file
...
This adds write path support for segmented chunk data files.
Files of 512MB are pre-allocated and written to. If the file size
is exceeded, the next file is started. On completion, files
are truncated to their final size.
2017-02-23 10:50:22 +01:00
Fabian Reinartz
a3b47c4929
Create default logger for DB
2017-02-19 16:04:37 +01:00
Fabian Reinartz
f734773214
Replace per-file locking with single PID lock file
...
File locks have a multitude of problems that make them hard to use
correctly. As they are just advisory, they are only meaningful to
prevent accidents like running the same process twice.
A simple PID file lock works reliably in those cases and is simpler.
2017-02-19 13:01:19 +01:00
Fabian Reinartz
c808928b90
SeriesWriter -> ChunkWriter
...
This commit simplifies a SeriesWriter into a ChunkWriter and detaches
it entirely from the notion of a series and the series index.
2017-02-19 11:27:31 +01:00
Fabian Reinartz
a61a31a5d7
compaction: add fast-path for compacting mem blocks
2017-01-30 09:49:36 +01:00
Fabian Reinartz
c20cc44b06
Add docs, write sequence number to meta.json
2017-01-29 08:11:47 +01:00
Fabian Reinartz
30d8866c13
Limit compaction range, make cut and compact concurrent
2017-01-20 07:58:19 +01:00
Fabian Reinartz
67d185ceb9
Compact based on compaction generation
2017-01-19 19:45:52 +01:00
Fabian Reinartz
d4779b374c
Properly track and write meta file
2017-01-19 14:01:38 +01:00
Fabian Reinartz
9ddbd64d00
Move stats into meta.json file, cleanup, docs
2017-01-19 11:22:47 +01:00
Fabian Reinartz
e006bc6dc6
Improve error messages, create regular dir for block
2017-01-19 08:40:15 +01:00
Fabian Reinartz
d2322f6095
Improve compaction processing
2017-01-18 06:18:32 +01:00
Fabian Reinartz
c32a94d409
Unexport HeadBlock, export Block interface
2017-01-10 15:41:57 +01:00
Fabian Reinartz
142c89b8b0
Fix/update metrics
2017-01-09 19:14:21 +01:00
Fabian Reinartz
1943f8d1bb
Fix head block stats races
2017-01-07 18:02:17 +01:00
Fabian Reinartz
c61b310210
Naive size-based compaction
...
This adds naive compaction that tries to compact three
blocks of roughly equal size.
It decides based on samples present in a block and has no
safety measures considering the actual file size.
2017-01-06 13:53:05 +01:00
Fabian Reinartz
96c2bd249f
Handle compaction trigger and reinitializing in DB
2017-01-06 13:03:23 +01:00
Fabian Reinartz
3ed2c2a14b
Rename Partition to regular DB, DB to PartitionedDB
2017-01-06 11:40:09 +01:00
Fabian Reinartz
4590b61343
Rename shard to partition
2017-01-06 08:08:02 +01:00
Fabian Reinartz
9790aa98ac
Add postings wrapper that emits head postings in label set order
...
This adds a position mapper that takes series from a head block
in the order they were appended and creates a mapping representing
them in order of their label sets.
Write-repair of the postings list would cause very expensive writing.
Hence, we keep them as they are and only apply the postition mapping
at the very end, after a postings list has been sufficienctly reduced
through intersections etc.
2017-01-05 16:05:42 +01:00
Fabian Reinartz
5aa7f7cce8
Compact head block into persisted block
2017-01-04 21:11:15 +01:00
Fabian Reinartz
ac49f8c15e
Consolidate persistence and compaction
2017-01-03 16:49:37 +01:00
Fabian Reinartz
e7f04d14d5
Lock mmapped files
2017-01-03 10:09:20 +01:00
Fabian Reinartz
a648ef5252
Convert persister into function
2017-01-02 16:58:47 +01:00
Fabian Reinartz
dbd2b21d2e
Make persistence atomic
2017-01-02 14:41:13 +01:00
Fabian Reinartz
62b8ded0a5
Rename iterator value getters to At()
2017-01-02 13:33:06 +01:00