Commit Graph

1228 Commits (ac0c0756bfad34d8b8c34c670a0e5537bbb8287b)

Author SHA1 Message Date
Edd Robinson 3086f02b2e
Merge pull request #9490 from influxdata/er-time-test
Support less granular mtime in LastModified test
2018-02-28 10:14:39 +00:00
Stuart Carnie e493a3e1db use child logger 2018-02-27 20:27:24 -07:00
Edd Robinson 45af822200 Support less granular mtime 2018-02-27 16:12:59 +00:00
Stuart Carnie 48fb2a4cc5
Merge pull request #9487 from influxdata/sgc-tagsets
fallback to inmem TagSets implementation
2018-02-27 09:06:54 -07:00
Stuart Carnie b72e0c5941 fallback to inmem TagSets implementation 2018-02-27 07:49:51 -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 b03cf6a953 prefix with `tsm1_` for consistency 2018-02-26 13:00:03 -07: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 d40d3ecc2e
Merge pull request #9456 from influxdata/sgc-logging
Generate trace logs for a number of important InfluxDB operations
2018-02-21 15:09:18 -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
Jason Wilder fd90ec2b04 Remove noisy trace logging in TSM engine
This logging is noisy and allocates a lot of garbage.  There are
stats now that have the same information.
2018-02-21 12:51:01 -07:00
Jason Wilder a865e14455
Merge pull request #9470 from influxdata/jw-cur-close
Make closing TSM cursors idempotent
2018-02-21 09:34:13 -07:00
Jason Wilder fca3061f3c Make closing TSM cursors idempotent
Double closing a bufCursor would cause a panic.  There was also
some typed cursors that had the same problem.
2018-02-21 09:05:54 -07:00
Jonathan A. Sternberg d38413a849
Merge pull request #9454 from influxdata/js-structured-logging
Update logging calls to take advantage of structured logging
2018-02-21 09:14:40 -06:00
Jason Wilder f7279b57f3 Re-open last WAL segment
Re-open the last wal segment instead of creating a new one.  This fixes
an issue where the last modified time of the WAL would change on
restart.  It also avoids a lot of IO file churn on restart.
2018-02-20 14:24:04 -07:00
Jonathan A. Sternberg 2bbd96768d Update logging calls to take advantage of structured logging
Includes a style guide that details the basics of how to log.
2018-02-20 10:04:19 -06:00
Stuart Carnie 6e47ff8d7f simplify code 2018-02-14 06:55:48 -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
Stuart Carnie 0f6e6fb9ef
Merge pull request #9192 from influxdata/sgc-writer
ensure tsmWriter#Write returns ErrMaxBlocksExceeded
2018-02-01 15:39:01 -07:00
Jason Wilder 3299e549aa Increase WAL write buffer size
The default of 4096 results in writes to the WAL still requiring muliple
IOs.  We had previously bumped this to 1M, but that was too high when
there are many shards.  Increasing to around 16k reduces the IOs to
one or two for the workloads tested.  We may want to make this
configurable in the future.
2018-01-31 13:55:32 -07:00
Jason Wilder e9db11a3e9 Reduce cache partitions to 16
The large number of partitions cause big HeapInUse swings at higher
cardinality which can lead to OOMs.  Reducing this to 16 lowers
write throughput to some extent at lower cardinalities, keeps memory
more stable over the long run.
2018-01-31 13:55:32 -07:00
Jason Wilder ee270e1dd2 Use MADV_WILLNEED when loading TSM files
When the TSM index is large, this hints to the kernel to start
faulting in pages to avoid lots of smaller page faults.
2018-01-31 12:38:16 -07:00
Joe LeGasse 21a58235fc
Merge branch 'master' into jl-race 2018-01-29 15:52:18 -05:00
Edd Robinson 821b784fa0 Switch deprecated HasPrefix for raw string check 2018-01-21 12:08:25 -08:00
Edd Robinson 42c3adeffc simplify packages under tsdb 2018-01-21 09:41:27 -08:00
Edd Robinson 90903fa6ed Remove unused code/cleanup engine package 2018-01-20 13:56:45 +00:00
Jason Wilder 97f61e0ff4 Allow SeriesFile compaction to be disabled 2018-01-18 15:54:52 -07:00
Jason Wilder d755daede8 Add ability to enable/disable tsi compactions 2018-01-18 14:25:58 -07:00
Joe LeGasse 425a5e5f17 tsm1: prevent WaitGroup race 2018-01-17 13:08:11 -05:00
Joe LeGasse 140d5c3efa
Merge pull request #9327 from influxdata/jl-wal-lastmodified
wal: update lastWriteTime behavior
2018-01-17 11:54:33 -05:00
Joe LeGasse 129c2f0120 tsm: skipping LastModified test for now 2018-01-17 11:14:45 -05:00
Jason Wilder b05754fd23 Fix nil pointer panic
Under concurrent writes and deletes of the same series, a nil panic
could occur in bytes.Compare.  Instead of setting the seriesKeys to
nil, set them to an 0 length slice which prevents the panic.
2018-01-17 07:57:30 -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
Joe LeGasse 68e20c4f80 wal: update lastWriteTime behavior 2018-01-16 21:22:24 -05:00
Jason Wilder 1c8676b4a3 Rebuild corrupted fields index when necessary
If the fields.idx was corrupted in someway, it would cause the shard
to fail to load.  Deleting the file will allow it to be rebuilt.

This change handles this automatically so it's rebuilt if necessary
without user intervention.
2018-01-16 11:31:07 -07:00
Edd Robinson a2ece0a49a Pass series id in via Index API 2018-01-15 12:00:31 +00:00
Ben Johnson d295f30686 Remove series id check during deletion. 2018-01-15 12:00:31 +00:00
Edd Robinson bb6bfad5ea Ensure inmem index updated properly 2018-01-15 12:00:30 +00:00
Edd Robinson b9d0a39131 Skip empty series keys 2018-01-15 12:00:30 +00:00
Edd Robinson a4bef3a4bc Refactoring delete tests 2018-01-15 12:00:30 +00:00
Edd Robinson 74481b9415 Fix shard 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
Edd Robinson 286c8f4c09 Return to original DELETE/DROP SERIES semantics
This reverts commit 59afd8cc90.
2018-01-15 12:00:30 +00:00
Jason Wilder a4d13c7098 Update TestIndex_SeriesIDSet
The series ids are no longer lower than 4 so this test will always
fail.
2018-01-11 13:49:50 -07:00
Jason Wilder c2cbd14e09 Fix TestEngine_DisableEnableCompactions_Concurrent hang
This test could hang due to an existing race that is still not fixed.
The snapshot and level compaction goroutines woule end up waiting on
the wrong channel to be closed so whey would never exit.
2018-01-11 11:58:20 -07: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 ecef790574 Update timeout on test 2018-01-11 11:41:30 +00:00
Edd Robinson ed8b9925c8 Comment update 2018-01-11 01:01:54 +00: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