Commit Graph

253 Commits (9f757290f84da3104103c00d986382151319b2a8)

Author SHA1 Message Date
marchtea 6e6f92c99a fix index file fd leak 2017-06-12 10:58:05 +08:00
Ben Johnson bcc6ef769b
Check file count before attempting a TSI level compaction.
This check was previously in a different section of code which
was lost during a refactor to the new compaction strategy. The
compaction planning now makes a check to ensure at least two
files are available for compaction in a level.
2017-06-06 11:08:59 -06:00
Stuart Carnie 46796d932f add database to index, engine and shard; call AuthorizeSeriesRead 2017-05-26 13:21:50 -07:00
Joe LeGasse 815f740f4c initial fga work
wip

wip

fix tests / build
2017-05-26 13:16:27 -07:00
Jason Wilder 14b54e08cb Fix compile error 2017-05-25 15:18:35 -06:00
Ben Johnson 24446a0297
Implement zap logging in TSI. 2017-05-25 08:57:50 -06:00
Ben Johnson 547db32d01
Fix tsi go vet issues. 2017-05-23 13:42:38 -06:00
Ben Johnson 48456d80ad
Remove tsi commented code. 2017-05-23 10:24:37 -06:00
Ben Johnson 2524df3405
Convert tsi1 series keys to uint32. 2017-05-23 09:48:13 -06:00
Ben Johnson c744e2f562
TSI pull request fixes. 2017-05-23 09:01:05 -06:00
Ben Johnson 57eeae03fc
Add note about SeriesIDs() limitation. 2017-05-23 08:42:25 -06:00
Ben Johnson e7f39c06ab
Refactor TSI1 compaction. 2017-05-23 08:42:25 -06:00
Ben Johnson 1975940f76
intermediate compaction commit 2017-05-23 08:42:25 -06:00
Ben Johnson 79edc0979c
Add temporary debugging stats for offset lookups. 2017-05-23 08:41:31 -06:00
Ben Johnson 48a06432df
Add tsi1 bloom filter. 2017-05-23 08:41:31 -06:00
Ben Johnson f3e08c5871
Delta encode tag and measurement block series data. 2017-05-23 08:41:31 -06:00
Ben Johnson 6f58149052
Increase tsi compaction factor. 2017-05-23 08:40:26 -06:00
Jason Wilder 2cac46ebbc Convert usage of strings to []byte
Measurement name and field were converted between []byte and string
repetively causing lots of garbage.  This switches the code to use
[]byte in the write path.
2017-05-12 14:05:19 -06:00
Ben Johnson 489c89bea4
Add tsi support tooling. 2017-05-08 11:00:15 -06:00
Ben Johnson ba7108f94e
Add TSI documentation. 2017-04-21 14:45:03 -06:00
Jason Wilder 02b663b651 Fix lock contention in Index.CreateSeriesListIfNotExists
There was contention on the write lock which only needs to be acquired
when checking to see if the log file should be rolled over.
2017-04-20 12:28:42 -06:00
Jason Wilder 40ec85aacd Fix lock contention in LogFile.SeriesWithBuffer
Under high write load, the check for each series was done sequentially
which caused a lot of CPU time to acquire/release the RLock on LogFile.

This switches the code to check multiple series at once under an RLock
similar to the chang for inmem.
2017-04-20 12:28:42 -06:00
Ben Johnson 9c97cd8601
Merge remote-tracking branch 'upstream/master' into tsi 2017-04-04 12:46:09 -06:00
Ben Johnson 0d74497abe
Reset rhh map elements to reuse allocations. 2017-04-04 11:57:37 -06:00
Ben Johnson 6ff27c95e5
Fix tsi assertions. 2017-04-04 11:29:21 -06:00
Ben Johnson 95d4016ff2
Merge branch 'tsi' of https://github.com/influxdata/influxdb into tsi-series-block-partitioning 2017-04-04 10:14:03 -06:00
Ben Johnson bf49b176f5
Partition tsi1 series index. 2017-04-04 09:46:04 -06:00
Edd Robinson fddaff2cc8 Merge master in 2017-03-29 18:00:28 +01:00
Edd Robinson 116230b427 Use varint for tag count 2017-03-29 16:31:13 +01:00
Ben Johnson 2edfb1c92d
Ignore series limit on database load. 2017-03-24 16:27:16 -06:00
Ben Johnson 9fb8f1ec1d
Fix database and tag limits. 2017-03-24 09:48:10 -06:00
Ben Johnson 85c1ae4dd4
Remove sort.Slice 2017-03-21 12:33:05 -06:00
Ben Johnson 1e9fa7bc2c
Fix 32-bit rhh implementation. 2017-03-21 11:44:13 -06:00
Ben Johnson 5cf41adcb8
Optimize tsi1 write path.
Removes sorted series list in log, uses a buffer for HasSeries(),
and prepends a length for series key encoding.
2017-03-21 08:44:35 -06:00
Ben Johnson 5d67c424bf
Refactor tsi1 write locking. 2017-03-17 11:20:50 -06:00
Ben Johnson 70efc70abe
Reduce lock contention, fix rhh lookup. 2017-03-17 09:44:11 -06:00
Ben Johnson 1807772388
Fix tsi tests. 2017-03-15 11:23:58 -06:00
Edd Robinson ddcea1c322 WHY YOU SMITE ME BEN. B. JOHNSON? 2017-03-15 12:50:03 +00:00
Ben Johnson d23f2971c3
Refactor TagBlockEncoder. 2017-03-10 10:08:16 -07:00
Ben Johnson 7ee0b9bb28
Rewrite SeriesBlockEncoder. 2017-02-16 09:39:51 -07:00
Ben Johnson 7e6f33ef48
TSI1 Index file compaction. 2017-02-15 08:44:22 -07:00
Ben Johnson 71d13fed6d
Immediate, parallel tsl compactions. 2017-02-15 08:44:21 -07:00
Edd Robinson 7749bc1c67 Store sorted series in logFile 2017-02-13 17:03:42 +00:00
Edd Robinson a6a2f9d5f0 Don't load meta data for tsi 2017-02-09 17:59:14 +00:00
Edd Robinson 2d59fb788c Modify arguments to reduce allocations 2017-02-09 15:01:32 +00:00
Edd Robinson c2bbc18e4b Reduce repeated string allocations 2017-02-09 11:23:23 +00:00
Edd Robinson 21e821e5f9 Reduce memory footprint by pre-allocating 2017-02-08 18:49:03 +00:00
Edd Robinson a9d58cc879 Add log file benchmarks 2017-02-08 16:50:46 +00:00
Ben Johnson d6fedcacd5
Refactor tsi.LogFile compaction. 2017-02-08 09:00:08 -07:00
Ben Johnson c4e9430de3
Recover after partial tsi log file write. 2017-02-07 10:02:31 -07:00
Ben Johnson d91e6eabac
Add max-values-per-tag to inmem index. 2017-02-06 11:14:13 -07:00
Edd Robinson 908959a78a Fix vet 2017-02-03 11:57:35 +00:00
Ben Johnson c246f3d9b0
Use inmem index on existing shards. 2017-02-02 10:04:25 -07:00
Edd Robinson 5a37d51f02 Refactor DropSeries 2017-02-01 22:07:44 +00:00
Ben Johnson 57f44d5f0c
Include index in snapshot. 2017-02-01 14:19:42 -07:00
Edd Robinson ffced9b538 Move sketch merging into File 2017-02-01 15:33:30 +00:00
Edd Robinson ab238251f4 Refactor measurement sketches 2017-02-01 14:56:35 +00:00
Edd Robinson d8a73a1954 Go vet 2017-02-01 14:51:15 +00:00
Ben Johnson 05bbda2c0a
Fix measurement block sketches. 2017-02-01 07:40:00 -07:00
Ben Johnson 86e908c384
Remove debug println(). 2017-01-31 09:24:58 -07:00
Ben Johnson f4a4d1e196
Fix series sketches. 2017-01-31 08:47:18 -07:00
Ben Johnson 42959ead1f
Fix CreateSeriesListIfNotExists() data race. 2017-01-30 10:07:07 -07:00
Jason Wilder 2ae9406c1d Reincorporate memory leak fix
7832 got lost during a rebase/merge.  This reincorporate the fix
for the in-memory index as well as tsi.
2017-01-24 20:13:48 -07:00
Jason Wilder 173003bc38 Fix go vet 2017-01-24 20:13:37 -07:00
Ben Johnson 047c21f4d9
Merge remote-tracking branch 'upstream/master' into tsi 2017-01-24 09:28:58 -07:00
Ben Johnson c459d24a60
Test coverage. 2017-01-23 09:38:27 -07:00
Ben Johnson f43b0f7ec9
Fix series & measurement deletion. 2017-01-12 09:29:40 -07:00
Ben Johnson 352817e8c4
Convert 32-bit offsets to 64-bit. 2017-01-11 08:58:10 -07:00
Ben Johnson 64c7715243
Rebase fixes. 2017-01-09 10:10:12 -07:00
Ben Johnson d1f1e19591
Fixing rebase. 2017-01-06 09:31:25 -07:00
Ben Johnson 1003db0067
Add active log file tracking, time-based compaction. 2017-01-05 10:17:12 -07:00
Ben Johnson c1c98223ec
Fix and optimize tsi1 FileSet. 2017-01-05 10:17:12 -07:00
Ben Johnson 31e74d809b
Add tsi FileSet. 2017-01-05 10:17:11 -07:00
Ben Johnson dcd2a771b0
Optimizing tsi compaction. 2017-01-05 10:17:11 -07:00
Ben Johnson 1ce99e797f
Use series map in tsi1.LogFile. 2017-01-05 10:17:11 -07:00
Ben Johnson 9b1e8215e0
Remove dictionary encoding, add bulk series insertion. 2017-01-05 10:17:11 -07:00
Ben Johnson 5f7654173e
Add locking to sketch merge. 2017-01-05 10:17:11 -07:00
Ben Johnson 9bd19cdc69
Fix inmem DELETE SERIES. 2017-01-05 10:17:11 -07:00
Edd Robinson 0f9b2bfe6a
Fix tests 2017-01-05 10:16:15 -07:00
Edd Robinson 4ccb8dbab1
Move series count check to shard 2017-01-05 10:16:13 -07:00
Edd Robinson 0cb74eedbf
Add log file (WAL) sketches 2017-01-05 10:15:38 -07:00
Edd Robinson 190c78c644
Add series sketches 2017-01-05 10:15:37 -07:00
Edd Robinson 695adafc00
Add measurement sketches 2017-01-05 10:15:37 -07:00
Ben Johnson 745b1973a8
tsi compaction 2017-01-05 10:15:37 -07:00
Ben Johnson 183418dcbd
Fix tsi TAG KEYS iterator. 2017-01-05 10:15:36 -07:00
Ben Johnson 759ff4ab80
Add tsi1 term hash index. 2017-01-05 10:15:35 -07:00
Ben Johnson 75cfe244c4
Add series hash index. 2017-01-05 10:15:35 -07:00
Ben Johnson 9f8b206b51
Fix measurement system queries. 2017-01-05 10:15:34 -07:00
Ben Johnson 4aa78383d1
Fix tsi1 series deletion. 2017-01-05 10:14:48 -07:00
Ben Johnson 5965610de6
Refactoring tsi tombstoning. 2017-01-05 10:14:02 -07:00
Ben Johnson e7940cc556
Add tsi1 series system iterator. 2017-01-05 10:14:00 -07:00
Ben Johnson 87f4e0ec0a
Add regex support in tsi1. 2017-01-05 10:12:29 -07:00
Ben Johnson d13afa8f47
Iterator refactoring 2017-01-05 10:11:49 -07:00
Jason Wilder f0427d180e
Fix tsi index panics
Hardcoded panics cause the server to crash in 10s due to stats collection.
2017-01-05 10:11:12 -07:00
Jason Wilder 4bf7b2bb19
Allow tsi to be enabled via config option 2017-01-05 10:11:12 -07:00
Jason Wilder 2b96c5d4d0
Set Tags on entry
These were lost when reloading from the index.  Fixes queries not
returning any data.
2017-01-05 10:11:12 -07:00
Jason Wilder a6490920fd
Fix reslicing indices
The slicing was backwards causing the buffer to grow indefinitely
and filling the disks on writes.
2017-01-05 10:11:12 -07:00
Jason Wilder 59864226b7
Add RWMutex to LogFile
Fixes concurrent map access panic
2017-01-05 10:11:12 -07:00
Ben Johnson fbe7f464ee
Improve insert performance. 2017-01-05 10:11:12 -07:00
Ben Johnson 33412782ed
Fix go vet issue. 2017-01-05 10:11:10 -07:00
Ben Johnson 2b864c72c5
Refactor MeasurementBlockTrailer read/write. 2017-01-05 10:11:10 -07:00
Ben Johnson 409b0165f5
shared in-memory index 2017-01-05 10:09:57 -07:00
Ben Johnson a812502ea3
reintegrating in-memory index 2017-01-05 10:07:35 -07:00