Commit Graph

13183 Commits (6a66b5faf0ac1c8441e61589fab61dae416d7f15)

Author SHA1 Message Date
Edd Robinson 6a66b5faf0 Cleanup services package 2018-01-21 10:52:37 -08:00
Edd Robinson b1b2b8d43d Clean up stress package 2018-01-21 10:07:08 -08:00
Edd Robinson 648040393c Clean up tests package 2018-01-21 09:53:57 -08:00
Edd Robinson 42c3adeffc simplify packages under tsdb 2018-01-21 09:41:27 -08:00
Edd Robinson 4ccb6ada69 Remove unused code/cleanup tsdb package 2018-01-20 14:06:15 +00:00
Edd Robinson 90903fa6ed Remove unused code/cleanup engine package 2018-01-20 13:56:45 +00:00
Edd Robinson 030fdc7966 Remove unused code/cleanup index packages 2018-01-20 13:56:28 +00:00
Adam 28f3912491
Renamed references for "enterprise" backup/restore mode to "portable" (#9346) 2018-01-19 16:53:43 -05:00
Mark Rushakoff bad455667a
Merge pull request #9342 from influxdata/mr-tcp-mux-race
Fix data races in tcp.Mux and tcp.listener
2018-01-19 08:06:54 -08:00
Jason Wilder a66193f52d
Merge pull request #9341 from influxdata/jw-tsi-delete-measurement
TSI/SeriesFile Compaction Disabling
2018-01-19 07:57:20 -07:00
Mark Rushakoff 4b1a35fb93 Fix data races in tcp.Mux and tcp.listener
This fixes two data races around concurrent calls to (*tcp.Mux).Close
and (*tcp.Mux).handleConn, discovered in Enterprise test suites.
2018-01-18 16:10:10 -08: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
Jason Wilder f46342e27a
Merge pull request #9340 from influxdata/jw-tsi-delete-measurement
Fix MeasurementHasSeries returning incorrect value
2018-01-18 14:04:11 -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 2b9b3140a4
Merge pull request #9339 from influxdata/jw-small-series-ids
Use full 32bits for series IDs
2018-01-18 12:59:09 -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
Jonathan A. Sternberg 9591ecf806
Merge pull request #9338 from influxdata/js-allow-binary-operations-on-literals
Update influxql version
2018-01-18 10:22:54 -06:00
Jonathan A. Sternberg 05f83d27ee Update influxql version
Fixes #9290.
2018-01-18 09:50:01 -06:00
Edd Robinson 2bf6ea3306
Merge pull request #9334 from influxdata/jw-delete-deadlock
Fix deadlock in DeleteSeries
2018-01-17 18:46:04 +00:00
Jason Wilder 8f52e442e6 Fix deadlock in DeleteSeries
The Store.Delete series held an RLock while deleting from each shard.
While deleting, the Engine uses shardSet to see if a series is fully
deleted.  The shardSet.ForEach also takes and RLock.  If a Lock is
requested between these two calls, a deadlock occurs.

To fix, we don't need to hold an RLock for the duration of the delete
in the store as each Shard handles concurrency itself and we have a
snapshot of the shards we need to access.
2018-01-17 10:28:21 -07: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 2d4790b9f7
Merge pull request #9328 from influxdata/jw-delete-tsi-perf
Speed up deletes for tsi
2018-01-17 08:31:47 -07: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
Edd Robinson 81de34548c
Merge pull request #9331 from influxdata/er-auth-shortcut
Unify approach to short-circuit auth
2018-01-17 14:45:06 +00:00
Edd Robinson de0e9b1a4b Unify approach to short-circuit auth 2018-01-17 14:00:24 +00:00
Jason Wilder 02da1d6dfa Remove defer for SeriesIDSet.Contains
This showed up in profiles deleting high cardinality.
2018-01-16 20:46:45 -07:00
Joe LeGasse b3391eaaad update CHANGELOG 2018-01-16 21:32:11 -05:00
Joe LeGasse 68e20c4f80 wal: update lastWriteTime behavior 2018-01-16 21:22:24 -05: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
Jason Wilder 5f45208752
Merge pull request #9326 from influxdata/er-series-cardinality
Use bitsets to calculate series cardinality
2018-01-16 16:53:55 -07:00
Edd Robinson bd762380b0 Use bitsets to calculate series cardinality 2018-01-16 23:22:52 +00:00
Ben Johnson 960b6f8ba5
Merge pull request #9325 from influxdata/bj-tsi-partition-close-check
Add tsi1.Partition closing check before compaction.
2018-01-16 16:19:36 -07:00
Jason Wilder f7e554ed52
Merge pull request #9323 from influxdata/jw-fields-corrupt
Rebuild corrupted fields index when necessary
2018-01-16 13:35:49 -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
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 fd80af3117
Merge pull request #9319 from influxdata/er-shard-rollover
Remove series when shard rolls over
2018-01-16 16:23:48 +00:00
Edd Robinson ceb3abd118 Remove series when shard rolls over
Series should only be removed from the series file when they're no
longer present in any shard. This commit ensures that during a shard
rollover, the series local to the shard are checked against all other
series in the database.

Series that are no longer present in any other shards' bitsets, are then
marked as deleted in the series file.
2018-01-16 15:58:20 +00:00
Edd Robinson ba3fcea53e
Merge pull request #9316 from influxdata/er-assign-unassign
Cleanup Shard assignment/unassignment
2018-01-16 15:57:41 +00:00
Edd Robinson 7ff3f67243
Merge pull request #9321 from influxdata/er-series-lock
Ensure no double Rlocking occurs in IndexSet
2018-01-16 15:56:32 +00:00
Edd Robinson 338f284bc9 Simplify series set Merge logic 2018-01-16 14:56:54 +00:00
Edd Robinson e902998f4e All closes are now fast 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
Edd Robinson 8039165ab4 Ensure no double r-locking occurs in IndexSet
use. However, because the reference counting was implemented via
mutexes, it was possible to double `RLock` the series file mutex. This
allows a `Lock` to arrive in-between the two `RLock`s, (such as when
deleting the database), causing deadlock.

This commit addresses this by ensuring that from within `IndexSet`
methods, when calling other `IndexSet` methods, that they're all
unexported, and that those unexported methods never take a lock on the
series file.

Keeping series file locking in exported `IndexSet` methods only, allows
one to see any future races more easily.
2018-01-16 14:56:34 +00:00
Edd Robinson 5bfd94787b
Merge pull request #9101 from mjs/faster-unescaping
pkg/escape: Preallocate output in Unescape
2018-01-15 22:21:45 +00:00
Menno Finlay-Smits acaf5f097a pkg/escape: Add benchmarks for all bytes escape/unescape funcs 2018-01-16 11:12:47 +13:00
Menno Finlay-Smits b0e871876a pkg/escape: Preallocate output in Unescape
Preallocating the capacity of the output is faster and uses less
memory than letting append() do its own (over)allocation.
2018-01-16 09:37:37 +13:00