Commit Graph

13853 Commits (be83e81102c523621c8e4d3ea8c8b228a6afd082)

Author SHA1 Message Date
Ben Johnson d3e3b05a49
Add tsm1 open limiter
This commit restricts the number of TSM1 files that can be opened
concurrently across the entire `tsdb.Store`. There is currently
a limit for the number of shards that can be opened concurrently,
however, this limit does not help when the number of CPU cores
is higher than the number of shards. Because TSM1 files have a 2GB
limit and there is no limit on the number of files per shard,
extremely large shards (1TB+) can load 1,000s of files simultaneously.
2018-05-29 10:21:53 -06:00
Jonathan A. Sternberg 4e1228fce3
Merge pull request #9855 from influxdata/js-megacheck-importer
Remove an unused variable caught by megacheck in the importer
2018-05-29 08:44:06 -05:00
Jonathan A. Sternberg efb811d156
Merge pull request #9907 from influxdata/js-fix-influx-inspect-manpage
Fix the influx_inspect man page
2018-05-25 11:56:38 -05:00
Jonathan A. Sternberg 6c418546bc Fix the influx_inspect man page 2018-05-25 09:36:20 -05:00
Jeff Wendling 2b3cd8406f
Merge pull request #9892 from influxdata/jmw-tombstone-notifications
tsdb: observe tombstone files as well
2018-05-24 09:56:09 -06:00
Ben Johnson 67030d1dae
Merge pull request #9898 from influxdata/pprof
Add optional pprof http endpoint immediately on startup.
2018-05-24 09:08:38 -06:00
Ben Johnson 8b44e3142c
Add optional pprof http endpoint immediately on startup.
This commit adds `debug-pprof-enabled` which will start the default
`net/http/pprof` endpoint and bind against `localhost:6060`. This
will help to debug startup performance issues.
2018-05-23 14:32:15 -06:00
Stuart Carnie e3d7095d14 fix(tsm1): Avoid searching index if key outside index bounds
This improvement avoids performing a binary search on the index by
first checking the key against the lower and upper bounds. Particularly
useful for multiple, fully-compacted TSM files.
2018-05-23 13:29:49 -07:00
Jeff Wendling ce565965a4 tsdb: avoid nil checks on the observer
this avoids nil panics in the case that someone eventually forgets.
2018-05-23 13:15:41 -06:00
Jeff Wendling 8ad515b387 tsdb: remove the shard id again
callers can always ensure that the observer set on the engine options
is appropriate for that shard id. this simplifies the api and reduces
the chance of bugs due to mixing up shard ids.
2018-05-23 13:04:54 -06:00
Stuart Carnie e209a0a1f2 Restore "Performance optimization suggestions"
CLA confirmed
PR: https://github.com/influxdata/influxdb/pull/9836

This reverts commit 7215bad
2018-05-23 08:54:20 -07:00
Jeff Wendling 15ae0bd98d tsdb: observe tombstone files as well 2018-05-22 22:07:16 -06:00
Jeff Wendling e62b1a02fb
Merge pull request #9879 from influxdata/jmw-add-shard-number-to-observer
tsdb: add shard number to the observer
2018-05-21 20:00:47 -06:00
Stuart Carnie 7215badfcd Revert "Performance optimization suggestions"
This reverts commit f82d53f75d.
2018-05-21 14:10:03 -07:00
chenjian.cj f82d53f75d Performance optimization suggestions 2018-05-21 13:30:32 -07:00
Ben Johnson ff070313ed
Merge pull request #9877 from influxdata/bj-http-throttle
Add http write throttling.
2018-05-21 13:22:19 -06:00
Ben Johnson 8a74c6759f
Add http write throttling.
This commit adds throttling to the HTTP write endpoints based on
queue depth and, optionally, timeout. Two queues exist: `enqueued`
and `current`. The `current` queue is the number of concurrent
requests that can be processed. The `enqueued` queue limits the
maximum number of requests that can be waiting to be processed.

If the timeout is exceeded or the `enqueued` queue is full then
a `"503 Service unavailable"` code is returned and the error is
logged.

By default these options are turned off.
2018-05-21 13:08:24 -06:00
Jeff Wendling b5f3ec6372
Merge pull request #9880 from influxdata/jmw-fix-minor-vet-issue
dumptsmwal: fix minor vet error
2018-05-21 09:02:49 -06:00
Jorge Landivar 3759664281
Merge pull request #9881 from michaelyou/feature-typo
Typo
2018-05-21 09:29:48 -05:00
michaelyou efc324681a Typo 2018-05-20 22:37:22 +08:00
Jonathan A. Sternberg 531dc49717
Merge pull request #9853 from influxdata/js-fix-log2-function
Fix the log2 function to return values
2018-05-19 11:35:31 -05:00
Jeff Wendling 6409b0a441 dumptsmwal: fix minor vet error 2018-05-18 18:21:19 -06:00
Jeff Wendling eb4bf651e5 tsdb: add shard number to the observer
an observer may want to know what shard the file is part of. this
way, they don't have to rely on brittle file path parsing.
2018-05-18 18:15:44 -06:00
Jeff Wendling 6320316fd4
Merge pull request #9852 from influxdata/jmw-tsm-notifications
file store: send notifications about new/deleted tsm files.
2018-05-18 11:29:34 -06:00
Jacob Marble 735aa2d7dc Add SeriesIDSet() to Index interface 2018-05-18 09:22:43 -07:00
Jacob Marble 3f2ff742c0 Remove unused 'database' field 2018-05-18 09:22:43 -07:00
Jonathan A. Sternberg de87298e38
Merge pull request #9870 from influxdata/js-fix-top-unit-test
Fix the new top/bottom unit tests
2018-05-17 18:00:30 -05:00
Jonathan A. Sternberg a1670613a1 Fix the log2 function to return values
The passed in argument wasn't correct so it always returned null instead
of the appropriate value.

Also includes unit tests for all of the math functions and restricts the
`asin()` and `acos()` functions to floats only since those functions
don't give any meaningful results when using integers or unsigned.
2018-05-17 15:44:58 -05:00
Jonathan A. Sternberg 1cf1a23361
Merge pull request #9860 from phemmer/ta-rename
rename "triple_exponential_average" -> "triple_exponential_derivative"
2018-05-17 14:42:26 -05:00
Jonathan A. Sternberg 04d5c83dcd Fix the new top/bottom unit tests
The new tests accidentally labeled the `p3` variable as the data type
rather than a string.
2018-05-17 13:46:24 -05:00
Hercules Mango Churchill 590d4d4fee Update changelog 2018-05-17 18:25:19 +00:00
Jeff Wendling 27040d6f31 file store: send notifications about new/deleted tsm files.
just adds some interface for hooks about when these files come and go.
we do them before the action is taken so that if the hook has an
error, it doesn't have any consistency problems.
2018-05-17 12:19:58 -06:00
Jacob Marble f6f02cea23
Merge pull request #9866 from influxdata/jgm-rp
Close TSMReaders from FileStore.Close after releasing FileStore mutex
2018-05-17 10:52:37 -07:00
Hercules Mango Churchill 86b90960a0 Update changelog 2018-05-17 17:35:51 +00:00
Jonathan A. Sternberg d37dc751ec
Merge pull request #9858 from influxdata/js-9197-top-return-correct-auxiliary-values
Return the correct auxiliary values for top/bottom
2018-05-17 12:35:30 -05:00
Jacob Marble c119f9a846 Close TSMReaders from FileStore.Close after releasing FileStore mutex 2018-05-17 09:12:36 -07:00
Jonathan A. Sternberg 8a2bc63d3c Return the correct auxiliary values for top/bottom
When `top()` or `bottom()` were used and selected auxiliary values, they
would return the wrong values that would be equal to the last point
selected. This is because the aggregators saved the memory address of
the auxiliary fields instead of copying them over. Since the same
auxiliary fields memory location is used for every value returned by the
storage engine, this resulted in the values being incorrect because they
were overwritten with incorrect values.

This fixes that so the auxiliary fields are copied out when they are
saved rather than only the memory location.
2018-05-17 10:25:40 -05:00
Patrick Hemmer 7dc7efd501 rename "triple_exponential_average" -> "triple_exponential_derivative" 2018-05-16 19:40:12 -04:00
Jeff Wendling 3fc40dd4a0
Merge pull request #9824 from influxdata/jmw-optimize-radix
radix: optimize for our use case
2018-05-16 13:43:30 -06:00
Jonathan A. Sternberg c36e75ad17 Remove an unused variable caught by megacheck in the importer 2018-05-16 13:22:15 -05:00
Peng Liu 2e3ef6c9d7 Parallel compression
Drop-in of pgzip for gzip
2018-05-16 11:19:57 -07:00
Jeff Wendling 1a8931af42
Merge pull request #9841 from influxdata/jmw-ensure-no-race-conditions
tsm1: ensure some race conditions are impossible
2018-05-16 11:56:10 -06:00
Jacob Marble 2dde4e6174
Fix broken unit tests after function signature change (#9848) 2018-05-15 16:22:24 -07:00
Ben Johnson 8838d284a5
Merge pull request #9826 from influxdata/bj-tsm-filename
TSM Filename Injection
2018-05-15 15:50:26 -06:00
Jacob Marble 7f8b7af61e
Cleanup index memory footprint counting code (#9828)
* Fix IndexSet.DedupeInmemIndexes

* Cleanup index memory footprint code
2018-05-15 11:25:19 -07:00
Hercules Mango Churchill e9605f8077 Update changelog 2018-05-15 17:51:35 +00:00
Ben Johnson 03c9a9b199
Merge pull request #9832 from influxdata/bj-dump-tsm-wal
Add dumptsmwal command to influx_inspect.
2018-05-15 11:51:17 -06:00
Ben Johnson a82efef9d1
Add OnNewEngine callback to EngineOptions. 2018-05-15 11:50:30 -06:00
Ben Johnson 22ffb6acda
Add dumptsmwal command to influx_inspect. 2018-05-15 11:21:35 -06:00
Jeff Wendling 7d2bb19b74 tsm1: ensure some race conditions are impossible
The InUse call on TSMFiles is inherently racy in the presence of
Ref calls outside of the file store mutex. In addition, we return
some TSMFiles to callers without them being Ref'd which might allow
them to be closed from underneath. While I believe it is the case
that it would be impossible, as the only thing that gets a handle
externally is compaction, and compaction enforces that only one
handle exists at a time, and thus is only deleted once after the
compaction is done with it, it's not very obvious or enforced.

Instead, always return a TSMFile with a Ref call under the read
lock, and require that no one else calls Ref. That way, it cannot
transition to referenced if the InUse call returns false under the
write lock.

The CreateSnapshot method was racy in a number of ways in the presence
of multiple calls or compactions: it did not take references to the
TSMFiles, and the temporary directory it creates could have been
shared with concurrent CreateSnapshot calls. In addition, the
files slice could have been concurrently mutated during a compaction
as well.

Instead, under the write lock, make a local copy of the state for
the compaction, including Ref calls (write locks are implicitly
read locks). Then, there is no need for a lock at all afterward.

Add some comments to explain these issues at the call sites of InUse,
and document that the Files method that returns the slice unprotected
is only for tests.
2018-05-14 19:45:42 -06:00