Commit Graph

9808 Commits (19e2af2abf3939b8bdd423cccc9438eb36dedc3e)

Author SHA1 Message Date
Cory LaNou 19e2af2abf Merge pull request #6116 from influxdata/extend-http-routes
Extend http routes
2016-03-24 14:25:04 -05:00
Cory LaNou a8e7e681d2 Update CHANGELOG.md 2016-03-24 13:04:07 -05:00
Cory LaNou 2a7abbab1f more external routes magic 2016-03-24 13:03:11 -05:00
Cory LaNou b3b4a3764a allow routes to be added outside the httpd package 2016-03-24 13:03:11 -05:00
Jason Wilder e42e1f887a Merge pull request #6060 from oldmantaiter/add-shard-duration
Add configurable shard duration to retention policies
2016-03-23 22:42:25 -06:00
Tait Clarridge 45b3e61ac7 Add configurable shard duration to retention policies
Allows configuration of shard group duration at database creation, and retention
policy create/alter time.

Query examples:

```
CREATE DATABASE testdb WITH DURATION 90d SHARD DURATION 30m NAME rp_testdb
CREATE RETENTION POLICY rp_testdb2 ON testdb DURATION INF REPLICATION 1 SHARD DURATION 30m
ALTER RETENTION POLICY rp_testdb2 ON testdb SHARD DURATION 1h
```

This can be useful with long duration retention policies with lots of data, where
you can split into smaller shards to relieve memory pressure.
2016-03-24 00:25:49 -04:00
Ben Johnson 5e8e849ebd Merge pull request #6102 from benbjohnson/limit-series
Limit series count in selection
2016-03-23 13:03:02 -06:00
Ben Johnson a6d9930b6f limit series count in selection
This commit adds a configurable limit to the number of series that
can be returned from a `SELECT` statement. The limit is checked
immediately after planning and is determined by the use of iterator
stats.

Fixes #6076
2016-03-23 12:48:48 -06:00
Ben Johnson 45f1c28adb add tsm iterator stats buffer
This commit adds a buffer for stats to be updated without
requiring a mutex lock/unlock on every point. The tradeoff
is that stats are not exactly precise. This works for our
use case because stats are only periodically checked.
2016-03-23 12:23:22 -06:00
Jason Wilder f233a8bac8 Update v0.11.0 release date 2016-03-23 09:35:52 -06:00
Jonathan A. Sternberg d85b7334cd Merge pull request #6081 from influxdata/js-6075-query-time-limit
Support a timeout for running queries in the query manager
2016-03-23 11:32:08 -04:00
Jonathan A. Sternberg 1806d5def7 Merge pull request #5223 from influxdata/js-debian-frontend-dockerfiles
Use DEBIAN_FRONTEND=noninteractive when using apt-get in Dockerfiles
2016-03-23 10:11:37 -04:00
Ross McDonald 682a58a678 Merge pull request #6065 from simnv/influx-service-wait-stop
Wait for a process termination on influxdb restart
2016-03-23 06:05:09 -05:00
Valeriy Simonov 938453b0dc Changelog update 2016-03-23 10:41:52 +05:00
Valeriy Simonov e70d8aaa25 Wait for process termination on restart
Fixing "bind: address already in use" error
2016-03-23 10:37:39 +05:00
Jonathan A. Sternberg 2f853d3a7f Merge pull request #6093 from influxdata/js-fix-bad-aux-iterator-merge
Fix a bad merge that removed ExpandSources from AuxIterators
2016-03-22 17:13:44 -04:00
Jonathan A. Sternberg cabcf4f2ae Merge pull request #6004 from influxdata/js-5728-improper-semicolon-handling
Properly handle semi-colons as part of the main query loop
2016-03-22 16:45:56 -04:00
Jonathan A. Sternberg 114e734ee5 Fix a bad merge that removed ExpandSources from AuxIterators
Regenerated the protobuf file for influxql to use a newer protobuf.
2016-03-22 16:36:22 -04:00
Jonathan A. Sternberg b89edfd71c Fix the code that handles semicolons
This allows multiple semicolons in a row now and also requires that a
semicolon separate commands. The query specification says this is
required, but a boolean error in `ParseQuery` makes one semicolon
optional and multiple semicolons an error.

Fixes #5728.
2016-03-22 15:32:54 -04:00
Jason Wilder 1100e3871b Merge pull request #6091 from brunoqc/patch-2
remove unneeded 'import' in client/README.md
2016-03-22 13:26:58 -06:00
Bruno Bigras 8657961f81 remove unneeded 'import' in client/README.md 2016-03-22 15:10:34 -04:00
Jonathan A. Sternberg 79fe4490c2 Support a timeout for running queries in the query manager
Include an interrupt iterator at the top level to interrupt the fill
iterator if it is producing too many points.

Fixes #6075.
2016-03-22 13:30:40 -04:00
Jonathan A. Sternberg 9620130308 Merge pull request #6019 from influxdata/js-5152-fix-where-with-field-and-tag
Fix where filters when a tag and a field are combined with OR
2016-03-22 13:30:26 -04:00
Jonathan A. Sternberg a35d9602cd Fix where filters when a OR is used and when a tag does not exist
If an OR was used, merging filters between different expressions would
not work correctly. If one of the sides had a set of series ids with a
condition and the other side had no series ids associated with the
expression, all of the series from the side with a condition would have
the condition ignored. Instead of defaulting a non-existant series
filter to true, it should just be false and the evaluation of the one
side that does exist should take care of determining if the series id
should be included or not. The AND condition used false correctly so did
not have to be changed.

If a tag did not exist and `!=` or `!~` were used, it would return false
even though the neither a field or a tag equaled those values. This has
now been modified to correctly return the correct series ids and the
correct condition.

Also fixed a panic that would occur when a tag caused a field access to
become unnecessary. The filter using the field access still got created
and used even though it was unnecessary, resulting in an attempted
access to a non-initialized map.

Fixes #5152 and a bunch of other miscellaneous issues.
2016-03-22 12:19:06 -04:00
Jonathan A. Sternberg 3a7d537ee6 Merge pull request #6028 from influxdata/js-5116-default-no-fill-for-select-into
Modify fill(null) to fill(none) in SELECT INTO queries
2016-03-22 12:13:17 -04:00
Jonathan A. Sternberg 38232ffc17 Merge pull request #6048 from influxdata/js-4306-string-equality-against-a-float
Fix eval when types do not match between the lhs and rhs
2016-03-22 12:12:10 -04:00
Ben Johnson 573dd0f96a Merge pull request #6035 from benbjohnson/query-engine-reduce-alloc
Reduce allocations in query execution
2016-03-22 10:11:14 -06:00
Jonathan A. Sternberg 8ab1a9b513 Merge pull request #6083 from influxdata/js-6079-limit-max-concurrent-queries
Limit the maximum number of concurrent queries
2016-03-22 12:08:36 -04:00
Ben Johnson 6e1c1da25b reduce allocations in query execution
This commit removes some heap objects by converting them from
pointer references to non-pointers or by reusing buffers.
2016-03-22 09:51:39 -06:00
Jason Wilder 7857e07a1e Merge pull request #6062 from influxdata/mr-prune-wal-config
Remove unused WAL configuration variables/fields
2016-03-22 09:20:27 -06:00
Jonathan A. Sternberg a82778c75c Merge pull request #6089 from influxdata/js-6055-order-by-desc-fix
Fix ORDER BY desc so it doesn't skip values
2016-03-22 09:55:29 -04:00
Jonathan A. Sternberg ad96207868 Fix ORDER BY desc so it doesn't skip values
After reading the initial buffer, ORDER BY desc would read the next
block into the buffer and only read the first element. It's because the
code that was copied from the ascending cursor wasn't modified correctly
to set the position to the last element in the buffer.

The buffer size has also been lowered from 1000 to 10 to match with the
ascending cursor for performance with limit queries.

Fixes #6055.
2016-03-22 09:40:11 -04:00
Jonathan A. Sternberg d96002f906 Merge pull request #5620 from influxdata/md-avoiding-downtime
Add notes on how to avoid downtime
2016-03-21 22:36:12 -04:00
Jonathan A. Sternberg abae1cfed0 Limit the maximum number of concurrent queries
Fixes #6079.
2016-03-21 22:34:27 -04:00
Jack Zampolin 6bf6491e36 Merge pull request #6085 from influxdata/js-fix-influx-stress-write
Fix influx stress point writer
2016-03-21 15:48:54 -07:00
Ben Johnson d58c6608fe add InterruptIterator.Stats() 2016-03-21 16:38:18 -06:00
Ben Johnson 65acce2aa6 Merge pull request #6073 from benbjohnson/stats
IteratorStats
2016-03-21 16:25:49 -06:00
Ben Johnson 7156c1f9bd add IteratorStats
This commit adds an `IteratorStats` that holds aggregate
iterator processing information. A method is also added to
`Iterator` to return the stats:

	Stats() influxql.IteratorStats

The remote iterators will also emit their stats in the point
stream upon first connection, on a given interval, and then
finally once the last point has been sent.
2016-03-21 16:25:19 -06:00
Jason Wilder ee2f21e76f Merge pull request #6082 from influxdata/jw-tsm
Fix partially written TSM files
2016-03-21 15:42:27 -06:00
Jonathan A. Sternberg ddf655c222 Fix influx stress point writer
It previously used the content type `application/x-www-form-urlencoded`.
When the HTTP write handler was changed to check an HTTP form parameter
in d96eef4, the body for any POST requests with that content type would
result in an empty body.
2016-03-21 17:34:41 -04:00
Jason Wilder 7567453c9a Ensure TSM files are fsync'd
Make sure TSM files are fsync'd when closed and also that the parent
dir is fsync'd when they are renamed.
2016-03-21 15:03:52 -06:00
Jason Wilder a4e5446ddd Return error when TSM writer close returns one
The TSM writer uses a bufio.Writer that needs to be flushed before
it's closed.  If the flush fails for some reason, the error is not
handled by the defer and the compactor continues on as if all is good.
This can create files with truncated indexes or zero-length TSM files.

Fixes #5889
2016-03-21 15:00:36 -06:00
Jonathan A. Sternberg b12cf04a73 Merge pull request #5950 from influxdata/js-5939-query-manager
Implement a query manager for running queries
2016-03-21 16:02:26 -04:00
David Norton 8afff49e2b Merge pull request #6072 from influxdata/dn-rename-func
rename CloneUserInfos to CloneUsers
2016-03-21 12:54:19 -04:00
Jonathan A. Sternberg 504bac53a9 Update changelog for the query management feature 2016-03-21 12:40:56 -04:00
Jonathan A. Sternberg d03125cdf7 Unit tests for the query manager 2016-03-21 12:40:54 -04:00
David Norton b2d30e4593 rename CloneUserInfos to CloneUsers 2016-03-21 12:16:53 -04:00
Jonathan A. Sternberg 9246816c66 Implement http.CloseNotifier interface for gzipResponseWriter
This seems to have been an oversight since all of the response writers
are supposed to implement this interface, but the gzipResponseWriter
didn't implement this interface for some reason.
2016-03-21 12:07:07 -04:00
Jonathan A. Sternberg 6655ca7769 Create a new interrupt iterator that will stop emitting points after an interrupt
Use of the iterator is spread out into both `IteratorCreators` and
inside of the iterators themselves. Part of the interrupt must be
handled inside of the engine so it stops trying to emit points when an
interrupt is found and another part of the interrupt has to happen when
combining the iterators so it doesn't just start reading the next shard.
2016-03-21 12:07:07 -04:00
Jonathan A. Sternberg 3e580bcf04 Allow a query to be killed
While this allows a query to be killed, it doesn't really do anything
yet since the interrupt happens only after the first row gets emitted
(the entire first series).

This section of code will likely have to be refactored to make this work
since we need a way to interrupt a currently running iterator.
2016-03-21 12:07:06 -04:00