Commit Graph

11619 Commits (3e52ec7ca23488a0cd6e9d36889a9bc884976c7c)

Author SHA1 Message Date
Jonathan A. Sternberg 3e52ec7ca2 Merge pull request #7762 from influxdata/js-6541-timezone-support
Support timezone offsets for queries
2017-03-28 10:39:07 -05:00
Cory LaNou b4d61d4ef4 Merge pull request #8119 from influxdata/cjl-influx-chunked
add chunked/chunk size as setting/options in cli
2017-03-28 10:38:56 -05:00
Jonathan A. Sternberg b869607dc2 Merge pull request #8185 from influxdata/js-8174-fix-query-parser-subtraction-confusion
Fix query parser when using addition and subtraction without spaces
2017-03-24 13:50:04 -05:00
Jonathan A. Sternberg ccf0cb8371 Fix query parser when using addition and subtraction without spaces
Additionally, support unary addition and subtraction for variables,
calls, and parenthesis expressions. Doing `-value` will be the
equivalent of doing `-1 * value` now.
2017-03-24 12:52:19 -05:00
Jonathan A. Sternberg 347b01814e Support timezone offsets for queries
The timezone for a query can now be added to the end with something like
`TZ("America/Los_Angeles")` and it will localize the results of the
query to be in that timezone. The offset will automatically be set to
the offset for that timezone and offsets will automatically adjust for
daylight savings time so grouping by a day will result in a 25 hour day
once a year and a 23 hour day another day of the year.

The automatic adjustment of intervals for timezone offsets changing will
only happen if the group by period is greater than the timezone offset
would be. That means grouping by an hour or less will not be affected by
daylight savings time, but a 2 hour or 1 day interval will be.

The default timezone is UTC and existing queries are unaffected by this
change.

When times are returned as strings (when `epoch=1` is not used), the
results will be returned using the requested timezone format in RFC3339
format.
2017-03-22 15:09:41 -05:00
Jonathan A. Sternberg 7a2063f597 Merge pull request #8098 from influxdata/js-8093-fix-exact-timestamp-range
Fix the time range when an exact timestamp is selected
2017-03-21 15:29:01 -05:00
Jonathan A. Sternberg 33981277bc Fix the time range when an exact timestamp is selected
There is a lot of confusion in the code if the range is [start, end) or
[start, end]. This is not made easier because it is acts one way in some
areas and in another way in some other areas, but it is usually [start,
end]. The `time = ?` syntax assumed that it was [start, end) and added
an extra nanosecond to the end time to accomodate for that, but the
range was actually [start, end] and that caused it to include one extra
nanosecond when it shouldn't have.

This change fixes it so exactly one timestamp is selected when `time = ?`
is used.
2017-03-21 14:55:31 -05:00
Jonathan A. Sternberg bf523c0513 Merge pull request #8182 from influxdata/js-8181-invalid-duration-literals-parsed-successfully
Return an error when an invalid duration literal is parsed
2017-03-21 13:13:25 -05:00
Jonathan A. Sternberg a6c09e58a0 Return an error when an invalid duration literal is parsed 2017-03-21 12:10:41 -05:00
Edd Robinson 4665e39ccf Merge pull request #8121 from influxdata/er-drop-db
Speed up DROP DATABASE
2017-03-21 12:39:06 +00:00
Edd Robinson 47448646ed Remove DropSeries on index 2017-03-21 11:35:31 +00:00
Edd Robinson f89de550ed Significantly speed up DROP DATABASE 2017-03-21 11:35:31 +00:00
Jason Wilder 4b5b47d6b1 Merge pull request #8156 from influxdata/jackzampolin-patch-1
Update ISSUE_TEMPLATE.md
2017-03-20 08:49:40 -06:00
Edd Robinson 71de233d6d Merge pull request #8155 from influxdata/er-user-perf
Reduce cost of admin user check
2017-03-20 12:50:34 +00:00
Edd Robinson 255992f5ec Reduce cost of admin user check
This commits adds a caching mechanism to the Data object, such that
when large numbers of users exist in the system, the cost of determining
if there is at least one admin user will be low.

To ensure that previously marshalled Data objects contain the correct
cached admin user value, we exhaustively determine if there is an admin
user present whenever we unmarshal a Data object.
2017-03-20 12:04:03 +00:00
Mark Rushakoff e1cc01e0a3 Merge pull request #8160 from eplanet/typo_config_sample
Fixed typo in etc/config.sample.toml
2017-03-17 18:11:10 -07:00
Jason Wilder d2b1c31034 Merge pull request #8158 from influxdata/jw-max-series-limit
Fix killing queries
2017-03-17 18:15:41 -06:00
Cory LaNou e07d84525d
add chunked/chunksize as setting/options 2017-03-17 18:25:52 -05:00
eplanet 90b09328d9 Fixed typo in etc/config.sample.toml 2017-03-18 00:02:34 +01:00
Jason Wilder 8177df2dab Simplify Measurement.TagSets signature 2017-03-17 16:19:10 -06:00
Jason Wilder 00306336ee Update changelog 2017-03-17 16:13:36 -06:00
Jason Wilder 2d5d899ac2 Allow queries to be interrupted during planning
If a bad query is run, kill query and limits would not kick in until
after it started executing.  Some bad queries that involve high
cardinality can cause the server to OOM just from planning which
defeats the purpose of the max-select-series limit.

This change primarily fixes max-select-series limit so that the query
is killed earlier and has the side effect that kill query now can kill
a query while it's being planned.
2017-03-17 16:00:54 -06:00
Jason Wilder 86ad0a45b6 Ensure iterators are closed when query is killed
The underlying iterators were not closed when a query was kill so
although the client would receive an error, the query would continue
on until completion.
2017-03-17 16:00:39 -06:00
Jason Wilder bc4aeefbed Check max-series-limit in shard iterator creation
The limit waited until all the iterators had been created which still
allows problem queries to be planned.  This allows the queries to be
aborted much earlier in some cases.
2017-03-17 16:00:25 -06:00
Jack Zampolin 179401c88d Update ISSUE_TEMPLATE.md 2017-03-17 14:20:16 -07:00
Jonathan A. Sternberg d3caef6685 Merge pull request #8152 from influxdata/js-7995-cli-prompt-in-docker-exec
Update liner dependency to handle docker exec
2017-03-17 10:35:11 -05:00
Jonathan A. Sternberg 5fba1bdcd3 Update liner dependency to handle docker exec
The liner dependency now handles the scenario where the terminal width
is reported as zero. Previously, liner would panic when it tried to
divide by the width (which was zero). Now it falls back onto a dumb
prompt rather than attempting to use a smart prompt and panicking.
2017-03-17 08:42:53 -05:00
Jonathan A. Sternberg 003e113851 Merge pull request #8149 from influxdata/js-8148-fill-linear-order-by-desc
Fix fill(linear) when multiple series exist and there are null values
2017-03-16 16:13:48 -05:00
Jonathan A. Sternberg 41c8370bbc Fix fill(linear) when multiple series exist and there are null values
When there were multiple series and anything other than the last series
had any null values, the series would start using the first point from
the next series to interpolate points.

Interpolation should not cross between series. Now, the linear fill
checks to make sure the next point is within the same series before
using it to perform interpolation.
2017-03-16 15:54:20 -05:00
Jonathan A. Sternberg 97a46640c6 Merge pull request #8110 from influxdata/js-8064-forbid-wildcard-in-binary-expr
Forbid wildcards in binary expressions
2017-03-16 14:46:33 -05:00
Jonathan A. Sternberg 5072db40c2 Forbid wildcards in binary expressions
When rewriting fields, wildcards within binary expressions were skipped.
This now throws an error whenever it finds a wildcard within a binary
expression in order to prevent the panic that occurs.
2017-03-16 14:26:10 -05:00
Jonathan A. Sternberg 6f8c44ceef Merge pull request #8102 from influxdata/js-8091-monitor-cq-measurement
Do not increment the continuous query statistic if no query is run
2017-03-16 12:58:23 -05:00
Jonathan A. Sternberg 9cdfdd04e9 Do not increment the continuous query statistic if no query is run
Instead of incrementing the `queryOk` statistic with or without the
continuous query running, it will only increment when the query is
actually executed.
2017-03-16 10:36:00 -05:00
Jason Wilder ce8d8e46cc Merge pull request #8143 from influxdata/jw-wal-sync-goroutine
Add WAL sync delay
2017-03-16 09:03:19 -06:00
Jason Wilder 27ae2929fc Add wal-fsync-delay to Diagnostics 2017-03-15 16:31:03 -06:00
Jason Wilder e9eb925170 Coalesce multiple WAL fsyncs
Fsyncs to the WAL can cause higher IO with lots of small writes or
slower disks.  This reworks the previous wal fsyncing to remove the
extra goroutine and remove the hard-coded 100ms delay.  Writes to
the wal still maintain the invariant that they do not return to the
caller until the write is fsync'd.

This also adds a new config options wal-fsync-delay (default 0s)
which can be increased if a delay is desired.  This is somewhat useful
for system with slower disks, but the current default works well as
is.
2017-03-15 16:31:03 -06:00
Jason Wilder 7bd1bd8ab3 Only calculate disk size if shard has changed
Calling DiskSize can be expensive with many shards.  Since the stats
collection runs this every 10s by default, it can be expensive and
wasteful to calculate the stats when nothing has changed. This avoids
re-calculating the shard size unless something has chagned.
2017-03-15 16:29:57 -06:00
Jonathan A. Sternberg a18a634fc3 Merge pull request #8062 from influxdata/js-8025-influxql-comments
Implement both single and multiline comments in influxql
2017-03-15 14:49:35 -05:00
Jonathan A. Sternberg 208d8507f1 Implement both single and multiline comments in influxql
A single line comment will read until the end of a line and is started
with `--` (just like SQL). A multiline comment is with `/* */`. You
cannot nest multiline comments.
2017-03-15 14:24:09 -05:00
Mark Rushakoff 0c1fc741f0 Merge pull request #8142 from influxdata/mr-pr-template-config
Mention config settings in PR template
2017-03-15 10:01:50 -07:00
Jason Wilder 65464ea0d1 Merge pull request #8131 from influxdata/jw-values-merge
Use standard merge algorithm when merging Values
2017-03-15 09:51:21 -06:00
Mark Rushakoff 3ba65a3650 Mention config settings in PR template 2017-03-15 08:44:48 -07:00
Jason Wilder a4cfeacedb Use standard merge algorithm for merging values
The previous version was very innefficient due to the benchmarks used
to optimize it having a bug.  This version always allocates a new
slice, but is O(n).
2017-03-15 08:59:41 -06:00
Jason Wilder 713a1d2fab Merge pull request #8137 from influxdata/jw-merge-12
Merge 1.2.2 to master
2017-03-14 17:51:34 -06:00
Jason Wilder a16d86ebaa Merge pull request #8136 from influxdata/sort-changelog
Place CHANGELOG.md in descending sort order.
2017-03-14 15:27:46 -06:00
Jason Wilder e62c72d1f9 Merge branch '1.2' into jw-merge-12 2017-03-14 15:15:50 -06:00
Ryan Betts 46fa0c33a0 Place CHANGELOG.md in descending sort order. 2017-03-14 16:38:06 -04:00
Mark Rushakoff 108c7bc54d Merge pull request #7853 from influxdata/mr-diagnostics-config
Report subset of config values in SHOW DIAGNOSTICS
2017-03-14 13:22:16 -07:00
Jason Wilder 4d37c9dc9e Fix broken Values.Merge benchmark
Merge had the side effect of modifying the original values so
the results are wrong because they always hit the fast path
after the first run.
2017-03-14 14:20:24 -06:00
Jason Wilder 1bcf3ae74c Merge pull request #8133 from influxdata/jw-max-row-limit
Disable max-row-limit by default
2017-03-14 13:25:00 -06:00