Commit Graph

253 Commits (9f757290f84da3104103c00d986382151319b2a8)

Author SHA1 Message Date
Edd Robinson b19edd55ac Ensure shard-level cardinality is correct 2018-01-29 16:22:42 +00:00
Edd Robinson 42c3adeffc simplify packages under tsdb 2018-01-21 09:41:27 -08:00
Edd Robinson 030fdc7966 Remove unused code/cleanup index packages 2018-01-20 13:56:28 +00:00
Jason Wilder d755daede8 Add ability to enable/disable tsi compactions 2018-01-18 14:25:58 -07:00
Jason Wilder a88ac031de Fix MeasurementHasSeries returning incorrect value
If all the series in a measurement were tombstone, MeasurementHasSeries
would return true because the ok var was re-used from a prior check
earlier in the func.  This caused it to be true all the time unless
the measurment was actually tombstoned.
2018-01-18 13:05:04 -07:00
Jason Wilder 28edf1392a Use full 32bits for series IDs
This reworks the series ID allocation to prevent an overflow issue.
2018-01-18 09:45:36 -07:00
Jason Wilder 5d6b8fc834 Drop measurement after series
This separates out the dropping of a measurement from the series
to avoid frequent checks to see if a measurement still has series.
The series are dropped individually and we keep track of which
measurements are involved and then delete each measurment afterwards.
2018-01-17 07:57:25 -07:00
Ben Johnson b36b9f109f
Merge pull request #9324 from influxdata/bj-tsi-log-entry-short-buffer
Fix LogEntry.UnmarshalBinary() short buffer check.
2018-01-16 18:42:09 -07:00
Ben Johnson 3937fed7a1
Add tsi1.Partition closing check before compaction. 2018-01-16 13:32:44 -07:00
Ben Johnson 5f9d53b586
Fix LogEntry.UnmarshalBinary() short buffer check. 2018-01-16 13:14:26 -07:00
Edd Robinson 338f284bc9 Simplify series set Merge logic 2018-01-16 14:56:54 +00:00
Edd Robinson d890f29fcb Remove redundant index methods
Now that each shard-local index is maintaining a bitset of series ids,
tracking the series present in the local shard's tsm engine, there is no
need to track shards in the `inmem` index.

This commit removes the methods associated with tracking those
series/shard relationships.
2018-01-16 14:56:54 +00:00
Ben Johnson cc30abcae6
Fix TSI MeasurementExists() test. 2018-01-15 08:28:53 -07:00
Edd Robinson a2ece0a49a Pass series id in via Index API 2018-01-15 12:00:31 +00:00
Ben Johnson 1c4ab05c7e Add fast TSI MeasurementHasSeries() check. 2018-01-15 12:00:30 +00:00
Ben Johnson b07e41fa7f Fix partition series set building. 2018-01-15 12:00:30 +00:00
Ben Johnson 9a15130a4c Persist TSI tombstones. 2018-01-15 12:00:30 +00:00
Ben Johnson 69757ccd15 Fix partition series set building. 2018-01-15 12:00:30 +00:00
Edd Robinson 3d153e3808 Don't creation series in partition if none assigned 2018-01-15 12:00:30 +00:00
Edd Robinson 4913f2b4ac Refactor test Index/Series file with correct open 2018-01-15 12:00:30 +00:00
Edd Robinson 7f244cb29f Use models series key for partition allocation
There are two series key formats: the `models` package format, which is
also line-protocol format, and the `tsdb` package format, which is used
by the series file when serialising series keys.

When writing to a series, rather than taking a `models` format key from
the `coordinator` package and then converting it to a `tsdb` package
format, it would be cheaper to keep the key in the `models` format
before hashing it to determine which partition the key lives in.
2018-01-15 12:00:30 +00:00
Edd Robinson a4bef3a4bc Refactoring delete tests 2018-01-15 12:00:30 +00:00
Jason Wilder ba9a5af7eb Mark series deleted in series file
This commit adds the ability to correctly mark a series as deleted in
the global series file. Whenever a shard engine determines that a series
should be deleted, it checks with each shard's bitset for series that
are to be deleted and are no longer contained in any shard-local
bitsets.

These series are then removed from the series file.
2018-01-15 12:00:30 +00:00
Ben Johnson d610a79487
Merge pull request #9295 from influxdata/partition-series-file
Partition series file
2018-01-11 08:45:18 -07:00
Edd Robinson e2262d3e8e Implement series id tracking in TSI index 2018-01-11 01:01:54 +00:00
Edd Robinson e610e7c21d Track undeleted series IDs per-shard with inmem
This commit adds a bitset into each shard's in-memory index, to be used to
track undeleted series ids. Currently tsi1 support is not implemented.

When new series are added to the shard, the series id is added
to the bitset. When series are deleted from the shard, the series
ids are removed from the bitset.

Becasue each shard shares the same inmem index reference, the bitset
is stored in the `ShardIndex`, which is local to each shard, and then
different references are passed into the shared `Index` object, depending
on which shard is writing the series.
2018-01-11 01:01:54 +00:00
Edd Robinson e6f3aa107a Move SeriesSet to tsdb.SeriesIDSet 2018-01-11 01:01:54 +00:00
Edd Robinson 35543e385f Tidy up 2018-01-11 01:01:54 +00:00
Ben Johnson 9bf45fcae0
Improve inmem insert performance with non-sequential series ids. 2018-01-10 13:08:16 -07:00
Ben Johnson ac4dc91c64
Partition series file. 2018-01-10 08:33:25 -07:00
Edd Robinson f73a710320 More insight into assertion 2018-01-04 16:23:50 +00:00
Ben Johnson 31c50532db
Add series existence check in tsi1. 2018-01-03 12:20:35 -07:00
Ben Johnson 3900c948a2
Fix requested changes. 2018-01-03 10:04:12 -07:00
Ben Johnson 56980b0d24
Segment series file 2017-12-29 11:57:45 -07:00
Ben Johnson 4d7426ebbd
Fix race bug. 2017-12-21 10:12:21 -07:00
Ben Johnson 679335d027
Measurement iterator fix. 2017-12-20 15:43:17 -07:00
Ben Johnson 553c092484
Merge branch 'er-tsi-index-part' of https://github.com/influxdata/influxdb into er-tsi-index-part 2017-12-20 15:22:24 -07:00
Ben Johnson d8b1d208c0
rebase 2017-12-20 15:13:34 -07:00
Edd Robinson 9767660b8f Use MeasurementIterator 2017-12-19 19:23:01 +00:00
Ben Johnson 8b2dbf4d83
Merge branch 'er-tsi-index-part' of https://github.com/influxdata/influxdb into er-tsi-index-part 2017-12-19 10:33:02 -07:00
Ben Johnson 107291c6b0
series file refactor 2017-12-19 10:31:33 -07:00
Edd Robinson bde66f19bc Adjust series file size and partitions 2017-12-18 13:17:42 +00:00
Edd Robinson 3bfe525705 Add 32-bit support to series file
This commit ensures that the series file should work appropriately on
32-bit architecturs. It does this by reducing the maximum size of a
series file to 512MB on 32-bit systems, which should be fully
addressable.

It further updates tests so that the series file size can be reduced
further when running many tests in parallel on 32-bit architectures.
2017-12-15 15:47:26 +00:00
Edd Robinson 7e662a1294 Fix some races 2017-12-15 01:18:36 +00:00
Edd Robinson 289d1f8d44 Allow iterators to return if shard is closing 2017-12-15 00:46:43 +00:00
Edd Robinson 9e3b17fd09 Ensure deleted series are not returned via iterators 2017-12-14 21:29:35 +00:00
Edd Robinson 7080ffcaaa Fix MANIFEST test 2017-12-13 15:55:49 +00:00
Edd Robinson f1bcc97e89 Fix auth tests 2017-12-12 21:25:35 +00:00
Edd Robinson 077cbba0e8 Fix index tests 2017-12-12 21:25:35 +00:00
Ben Johnson 288c5217e8
Fix tsi1 tools. 2017-12-08 16:12:33 -07:00