Commit Graph

9784 Commits (a35d9602cda002e84ad32927f2ba0736659a3e98)

Author SHA1 Message Date
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
Jonathan A. Sternberg 117f62c33e Implement a simple task manager for queries
The currently running queries can be listed with the command
`SHOW QUERIES` and it will display the current commands that have been
run, the database they were run against, and how long they have been
running.
2016-03-21 12:06:06 -04:00
Mark Rushakoff 7a2adfcc5d Remove unused WAL configuration variables/fields
These were all b1/bz1 settings that no longer have any effect:

- {Default,}MaxWALSize
- {Default,}WALFlushInterval
- {Default,}WALPartitionFlushDelay
- {Default,WAL}ReadySeriesSize
- {Default,WAL}CompactionThreshold
- {Default,WAL}MaxSeriesSize
- {Default,WAL}FlushColdInterval
- {Default,WAL}PartitionSizeThreshold
2016-03-20 13:16:52 -07:00
Sean Beckett ddcc66a44c Update README.md 2016-03-18 19:09:01 -04:00
Michael Desa 341eeeedee Add notes on how to avoid downtime 2016-03-18 19:09:01 -04:00
Jonathan A. Sternberg d61d75f55d Merge pull request #6051 from mvadu/Fix_Windows_CreateDB
Fix Issue#6042, #6030 CreateDatabase failure on Windows
2016-03-18 13:13:47 -04:00
mvadu 8af9170c1d Add platform specific override for file rename.
In windows, it first deletes the target file (if it already exists).
2016-03-18 21:45:29 +05:30
Jonathan A. Sternberg 43a5e84aaf Merge pull request #6047 from influxdata/js-6040-boolean-distinct
Support the distinct() call for booleans
2016-03-17 17:17:21 -04:00
Edd Robinson a4b00aeeba Merge pull request #6046 from influxdata/er-update-licence
Update dependency licenses
2016-03-17 16:32:45 +00:00
Jonathan A. Sternberg f62f8a02dd Fix eval when types do not match between the lhs and rhs
Fixes #4306.
2016-03-17 10:50:14 -04:00
Jonathan A. Sternberg d24f9a9fb5 Merge pull request #5756 from influxdata/js-5744-integer-literal-support
Support integer literals in the query language
2016-03-17 10:49:51 -04:00
Jonathan A. Sternberg e47426ff6e Support integer literals in the query language
Numbers in the query without any decimal will now be emitted as integers
instead and be parsed as an IntegerLiteral. This ensures we keep the
original context that a query was issued with and allows us to act more
similar to how programming languages are typically structured when it
comes to floats and ints.

This adds functionality for dealing with integers promoting to floats in
the various different places where math are used.

Fixes #5744 and #5629.
2016-03-17 10:37:34 -04:00
Jason Wilder 334e93eec4 Merge pull request #6033 from influxdata/jw-fixes
Improve logging and blocked connection handling in muxer
2016-03-17 08:30:44 -06:00
Jonathan A. Sternberg 2e7816ebd9 Support the distinct() call for booleans
Normalize the time for the distinct() call to either be at the beginning
of the group by interval or the start time similar to every other call.
The timestamp previously just showed the first time found and didn't
make a lot of sense in the context of what the function was supposed to
do.

Fixes #6040.
2016-03-17 09:32:54 -04:00
Edd Robinson e9beece98e Add new dependency licenses 2016-03-17 11:26:04 +00:00
Edd Robinson 64b5737c7b Order dependencies 2016-03-17 11:13:13 +00:00
Jonathan A. Sternberg 9f2b1ee151 Merge pull request #6038 from influxdata/js-6034-empty-query-result-when-using-name
Rename the special condition "name" to "_name" to reduce conflicts
2016-03-16 20:31:28 -04:00
Ross McDonald 6a461d8a34 Merge pull request #5909 from influxdata/ross-build-updates
Minor Build Updates
2016-03-16 16:53:23 -05:00
Ross McDonald c4d7dd7093 Added support for build tags using the
`--build-tags=<tag1>[,<tag2>...]` syntax. Added a `--name` flag to
control the name of the produced package.
2016-03-16 16:31:23 -05:00
Gunnar c6ff2588d1 Merge pull request #6025 from influxdata/ga-remove-json
Remove deprecated JSON write path
2016-03-16 14:17:23 -07:00
Jonathan A. Sternberg d75428f79f Rename the special condition "name" to "_name" to reduce conflicts
Fixes #6034.
2016-03-16 17:17:04 -04:00
Todd Persen 40ec941cd4 Merge branch 'Vidhuran-bug3503-admin-ui-multiple-queries' 2016-03-16 13:22:45 -07:00
Todd Persen 58d1c8ded0 Display results of multiple queries in Admin UI, Not just the first query. 2016-03-16 13:22:37 -07:00
Jason Wilder f7c768e437 Improve logging and blocked connection handling in muxer
If the mux listener gets a invalid request, log the IP address of the
client to help users track down the issue.

Since the listener is started before the services that use it are ready,
it can receive requests and block indefinitely waiting for the handler
channel to receive.  If the channel is blocked, all the channel send
to timeout to prevent clients form accruing blocked connnecitons.
2016-03-16 12:26:14 -06:00