Commit Graph

269 Commits (ac0c0756bfad34d8b8c34c670a0e5537bbb8287b)

Author SHA1 Message Date
Jonathan A. Sternberg a6741aaf6c Simplify tsi1/log_file.go according to megacheck 2018-03-09 11:00:46 -06:00
Ben Johnson 8e62e8d3bd
Fix TSI log file recovery. 2018-03-05 14:49:12 -07:00
Ben Johnson 567a35d364
Fix panic on tsi1 log replay of deleted series. 2018-02-28 08:06:30 -07:00
Ben Johnson fee6149791
Merge pull request #9489 from influxdata/bj-dumptsi-cardinality
Add dumptsi path error handling.
2018-02-27 09:15:03 -07:00
Ben Johnson b3fcc63a78
Add dumptsi path error handling. 2018-02-27 08:30:12 -07:00
Edd Robinson 96c0ecf618 Improve startup time of `inmem` index
This commit improves the startup time when using the `inmem` index by
ensuring that the series are created in the index and series file in
batches of 10000, rather than individually.

Fixes #9486.
2018-02-27 13:33:00 +00:00
Stuart Carnie a74d296200 use underscore vs period, fix doc comment, add database name to CQ 2018-02-26 10:08:43 -07:00
Stuart Carnie d135aecf02 Generate trace logs for a number of significant influx operations
* tsdb Store.Open traces all events related to opening files
    * op.name : tsdb.open
* retention policy shard deletions
    * op.name : retention.delete_check
* all TSM compaction strategies
    * op.name : tsm1.compact_group
* series file compactions
    * op.name : series_partition.compaction
* continuous query execution (if logging enabled)
    * op.name : continuous_querier.execute
* TSI log file compaction
    * op_name: index.tsi.compact_log_file
* TSI level compaction
    * op.name: index.tsi.compact_to_level
2018-02-21 15:08:49 -07:00
Ben Johnson ed9c0576d4
Add series sketches, fix tombstones in index files. 2018-02-07 14:52:13 -07:00
Edd Robinson 0d164f3164
WIP - tsi integration sketches 2018-02-07 14:52:13 -07:00
Edd Robinson 7a55735562
Add option to set LogFile compaction size 2018-02-07 14:52:13 -07:00
Edd Robinson 544329380f
Add empty series sketches back to tsi1 index
This commit adds initial empty sketches back to the tsi1 index, as well
as ensuring that ephemeral sketches in the index `LogFile` are updated
accordingly.

The commit also adds a test that verifies that the merged sketches at
the store level produce the correct results under writes, deletions and
re-opening of the store.

This commit does not provide working sketches for post-compaction on the
tsi1 index.
2018-02-07 14:52:13 -07:00
Jason Wilder 20d429c62b Use cached tags when applying series entries 2018-01-30 16:02:50 -07:00
Ben Johnson da8568d86c
Remove unused field. 2018-01-30 10:34:29 -07:00
Ben Johnson a6d11585b3
Add TSI compaction interruption. 2018-01-30 10:34:17 -07:00
Ben Johnson 0652effb78
Interrupt TSI & Series File Compactions 2018-01-30 10:34:17 -07:00
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