Commit Graph

11522 Commits (54193e1131bcfafd4529b6192668edeab5cb3761)

Author SHA1 Message Date
Edd Robinson 54193e1131 Ensure config contains valid index 2017-02-03 11:57:41 +00:00
Edd Robinson 908959a78a Fix vet 2017-02-03 11:57:35 +00:00
Ben Johnson 76235f1e00
Use original index type for existing shards. 2017-02-02 10:43:48 -07: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 0a9fc910f6 Fix potential race on inmem 2017-02-01 16:29:52 +00:00
Edd Robinson ffced9b538 Move sketch merging into File 2017-02-01 15:33:30 +00:00
Edd Robinson ca530d478a Ensure we're testing both indexes 2017-02-01 14:56:35 +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 138a27f7f9
Merge branch 'tsi' of https://github.com/influxdata/influxdb into tsi 2017-01-31 09:25:05 -07:00
Ben Johnson 86e908c384
Remove debug println(). 2017-01-31 09:24:58 -07:00
Edd Robinson 1638cb6e79 Merge pull request #7913 from stuartcarnie/hll-perf
hll: skip recalc of sparseSet if tmpSet is empty
2017-01-31 16:00:33 +00:00
Stuart Carnie 0ebbfb8f77 hll: skip recalc of sparseSet if tmpSet is empty
```
benchmark                                 old ns/op     new ns/op     delta
BenchmarkSet_Count/set_size_1000-8        38095         28.3          -99.93%
BenchmarkSet_Count/set_size_5000-8        152052        30.1          -99.98%
BenchmarkSet_Count/set_size_10000-8       50953         54978         +7.90%
BenchmarkSet_Count/set_size_50000-8       32495         31222         -3.92%
BenchmarkSet_Count/set_size_1000000-8     32603         30800         -5.53%

benchmark                                 old allocs     new allocs     delta
BenchmarkSet_Count/set_size_1000-8        4              0              -100.00%
BenchmarkSet_Count/set_size_5000-8        4              0              -100.00%
BenchmarkSet_Count/set_size_10000-8       0              0              +0.00%
BenchmarkSet_Count/set_size_50000-8       0              0              +0.00%
BenchmarkSet_Count/set_size_1000000-8     0              0              +0.00%

benchmark                                 old bytes     new bytes     delta
BenchmarkSet_Count/set_size_1000-8        16496         0             -100.00%
BenchmarkSet_Count/set_size_5000-8        16497         0             -100.00%
BenchmarkSet_Count/set_size_10000-8       0             0             +0.00%
BenchmarkSet_Count/set_size_50000-8       0             0             +0.00%
BenchmarkSet_Count/set_size_1000000-8     0             0             +0.00%
```
2017-01-31 08:51:05 -07:00
Ben Johnson f4a4d1e196
Fix series sketches. 2017-01-31 08:47:18 -07:00
Edd Robinson ab94c1b743 Fixes #7882 2017-01-30 19:12:24 +00: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
Gunnar 3722fa383d Merge pull request #7718 from influxdata/ga-drop-stats
Add stats on dropped measurements and series; Fixes #7697
2017-01-20 15:54:06 -08:00
Mark Rushakoff 8e0bf700f8 Merge pull request #7857 from twiden/remove-deprecated-readme-instruction
Deprecated use of CREATE DATABASE in a read only context, use a POST …
2017-01-18 19:28:24 -08:00
Tobias Widén cd05decc6b Deprecated use of CREATE DATABASE in a read only context, use a POST request instead 2017-01-18 19:26:28 +01:00
Edd Robinson 0977272c53 Merge pull request #7847 from influxdata/er-double-rlock
Fixes racy locking on measurement
2017-01-17 09:42:17 -08:00
Edd Robinson 45324b3848 Fixes racy locking on measurement 2017-01-16 14:22:11 -08:00
Edd Robinson bb029b5444 Merge pull request #7839 from influxdata/er-subscriber
Ensure subscriber service respects config
2017-01-13 22:13:15 +00:00
Edd Robinson aa6b85a2dc Ensure subscriber service respects config 2017-01-13 20:09:40 +00:00
Mark Rushakoff 63e5bae7b8 Merge pull request #7832 from influxdata/mr-fix-http-write-memory-leak
Fix memory leak of retained HTTP write payloads
2017-01-13 12:04:24 -08:00
Joe LeGasse cd00085e9e Adjust Tags cloning
This change delays Tag cloning until a new series is found, and will
only clone Tags acquired from `ParsePoints...` and not those referencing
the mmap-ed files (TSM) that are created on startup.
2017-01-13 13:15:36 -05:00
Mark Rushakoff 7964a87310 Update CHANGELOG.md 2017-01-12 16:31:56 -08:00
Mark Rushakoff cdbdd156f3 Fix memory leak of retained HTTP write payloads
This leak seems to have been introduced in 8aa224b22d,
present in 1.1.0 and 1.1.1.

When points were parsed from HTTP payloads, their tags and fields
referred to subslices of the request body; if any tag set introduced a
new series, then those tags then were stored in the in-memory series
index objects, preventing the HTTP body from being garbage collected. If
there were no new series in the payload, then the request body would be
garbage collected as usual.

Now, we clone the tags before we store them in the index. This is an
imperfect fix because the Point still holds references to the original
tags, and the Point's field iterator also refers to the payload buffer.
However, the current write code path does not retain references to the
Point or its fields; and this change will likely be obsoleted when TSI
is introduced.

This change likely fixes #7827, #7810, #7778, and perhaps others.
2017-01-12 16:16:54 -08:00
joelegasse dcb379779a Merge pull request #7829 from influxdata/jl-deletepath
Add some checks before removing directories
2017-01-12 17:47:10 -05:00
Joe LeGasse 2db0250b22 Add db/rp name validation
This change adds some very basic name validation with the following
plain-english description: names must be non-zero sequence of printable
characters that do not contain slashes ('/' or '\') and are not equal to
either "." or "..".

The intent is that, since we currently just use database and retention
policy names directly as path elements, these rules will hopefully leave
us with names that should be at least close to valid directory names.

Ideally, we would restrict names even further or not use them as path
elements directly, but this should be a step towards the former without
restricting names "too much"
2017-01-12 17:38:10 -05:00
Joe LeGasse b19260fb26 Add some checks before removing directories
Fixes #7822

This change first ensures that databases and retention policies exist
before attempting to remove them from the Store. It also adds some
checks in the `DeleteDatabase` and `DeleteRetentionPolicy` to ensure
that maliciously named entries won't remove anything outside of the
configured data directory.
2017-01-12 17:38:10 -05:00
joelegasse 959a36f027 Merge pull request #7831 from influxdata/jl-readdir
Update backup to use ioutil.ReadDir
2017-01-12 16:44:58 -05:00
Joe LeGasse bf58d9ffb7 Update backup to use ioutil.ReadDir 2017-01-12 16:28:01 -05:00
Jason Wilder 22c6eccee9 Merge pull request #7824 from influxdata/ga-cli-message
Remove token message; Fixes #7823
2017-01-12 12:35:24 -07:00
Jason Wilder ccdb68841b Merge pull request #7820 from influxdata/cjl-7689-sgi-unix-epoch-zero-time
fix marshaling of zero time
2017-01-12 12:34:48 -07:00
Jason Wilder 7e7f0d0de2 Merge pull request #7830 from influxdata/jw-cache-snapshot
Cache snapshotting performance improvements
2017-01-12 12:11:53 -07:00
Jason Wilder 11f264563a Fix 32bit alignment 2017-01-12 12:01:49 -07:00
Jason Wilder 06a8fd6ca2 Simplifications and cleanup 2017-01-12 09:55:38 -07:00
Ben Johnson f43b0f7ec9
Fix series & measurement deletion. 2017-01-12 09:29:40 -07:00
Edd Robinson 73ed864e1d Add cache tests 2017-01-12 16:27:16 +00:00
Jason Wilder 33be1e1952 Update changelog 2017-01-12 09:02:59 -07:00
Jason Wilder 1e56b5416b Fix compactions sometimes getting stuck
I ran into an issue where the cache snapshotting seemed to stop
completely causing the cache to fill up and never recover.  I believe
this is due to the the Timer being reused incorrectly.  Instead,
use a Ticker that will fire more regularly and not require the resetting
logic (which was wrong).
2017-01-11 17:57:40 -07:00
Jason Wilder 40b017f4a4 Fix Cache stats size collection
The memory stats as well as the size of the cache were not accurate.
There was also a problem where the cache size would be increased
optimisitically, but if the cache size limit was hit, it would not
be decreased.  This would cause the cache size to grow without
bounds with every failed write.
2017-01-11 17:54:51 -07:00
Jason Wilder c433ff331f Encode snapshots concurrently
The CacheKeyIterator (used for snapshot compactions), iterated over
each key and serially encoded the values for that key as the TSM
file is written.  With many series, this can be slow and will only
use 1 CPU core even if more are available.

This changes it so that the key space is split amongst a number of
goroutines that start encoding all keys in parallel to improve
throughput.
2017-01-11 17:54:27 -07:00