Commit Graph

1762 Commits (f632770cda340f3dc90698fb128b8e163de51f5a)

Author SHA1 Message Date
timhallinflux 6cad2ca408 Update CHANGELOG.md
v0.13.0 -- added #6419: Fix panic in transform iterator on division. @thbourlove
v0.12.2 -- #6419 was backported to 0.12.2 as well as PR #6431: Fix panic in transform iterator on division. @thbourlove.  Added.
2016-12-19 19:46:49 -08:00
timhallinflux fdc0fea1d3 Update CHANGELOG.md
v0.13.0 -- removed duplicate from bugfixes:  - [#6468](https://github.com/influxdata/influxdb/issues/6468): Panic with truncated wal segments
2016-12-19 19:29:24 -08:00
timhallinflux 090e131980 Update CHANGELOG.md
v0.13.0 -- removed duplicate entry for  - [#6477](https://github.com/influxdata/influxdb/pull/6477): Don't catch SIGQUIT or SIGHUP signals.
2016-12-19 19:27:29 -08:00
timhallinflux 3d819abd7f Update CHANGELOG.md
Features reported in v0.13.0:
- [#6593](https://github.com/influxdata/influxdb/pull/6593): Add ability to create snapshots of shards.
- [#6585](https://github.com/influxdata/influxdb/pull/6585): Parallelize iterators

were not released until v1.0.0.  Moved these into the v1.0.0 release notes.
2016-12-19 17:19:34 -08:00
kun de4436e9d9 fix scan tag value panic 2016-12-20 08:39:18 +08:00
timhallinflux 2433660e68 Update CHANGELOG.md
v1.0.0 bug fixes referenced issue #6649...but that issue was addressed by #6648.  Changelog now correctly references #6648...
2016-12-19 16:31:23 -08:00
timhallinflux f42c1e28ba Update CHANGELOG.md
removed duplicate entry in the bugfix section.  #7119 was there 2x.
2016-12-19 16:20:17 -08:00
timhallinflux 247d987eb2 Update CHANGELOG.md
v1.0.1 - fixed issue 7299's URL -- missing an "i" in issues.
2016-12-19 15:24:02 -08:00
timhallinflux d1669c8143 Update CHANGELOG.md
re-ordered features and bugfixes in numerical order, descending for releases 0.13.0 through 0.10.0
2016-12-19 15:10:27 -08:00
timhallinflux aff45aa47c Update CHANGELOG.md
re-ordered all features and bugfixes in numerical order, descending from 1.1.0 through 1.0.0
2016-12-19 15:02:36 -08:00
timhallinflux f667d96500 Update CHANGELOG.md
re-ordered v1.1.1 bugfixes... numerical order, descending
2016-12-19 14:57:26 -08:00
timhallinflux a2f939834a Update CHANGELOG.md
re-ordered Features and Bugfixes in numerical order, descending for v1.2.0
2016-12-19 14:56:01 -08:00
timhallinflux 0fcd0ac3bc Update CHANGELOG.md
Made 1.1.0 Features Section consistent with the other releases.  Github issue # -- followed by summary text.
2016-12-19 14:35:48 -08:00
Jason Wilder 34c06d222a Update changelog 2016-12-19 11:47:00 -07:00
Jason Wilder 4787ed1b94 Update 1.1.1 release date 2016-12-19 11:11:50 -07:00
Edd Robinson 43834d3db8 Update Go version to 1.7.4 2016-12-19 11:11:00 -07:00
Edd Robinson db4e50f34f Fixes #7625 2016-12-19 11:09:10 -07:00
Mark Rushakoff 295a29d4ea Fix quoting on exported string fields
The previous implementation was wrong and double-escaped quotes and
backslashes.
2016-12-18 00:37:48 -08:00
Mark Rushakoff 9effe6f364 Update CHANGELOG 2016-12-17 20:34:04 -08:00
Edd Robinson 66edb32182 Sharded Cache using a hash ring 2016-12-14 18:23:36 +00:00
Jonathan A. Sternberg 74d474594f Remove the override of GOMAXPROCS
This was needed when we were on go 1.4 but hasn't been needed since go
1.5. It was kept because we weren't sure if we were going to have to
rollback to an older version of Go at that time and we kept it so we
wouldn't forget to readd it.

Now that we are on go 1.7 with go 1.4 deprecated, there is no going back
so we might as well remove this so people can set GOMAXPROCS to a custom
value using environment variables.
2016-12-14 12:00:40 -06:00
Jonathan A. Sternberg 21502a39e8 Switch logging to use structured logging everywhere
The logging library has been switched to use uber-go/zap. While the
logging has been changed to use structured logging, this commit does not
change any of the logging statements to take advantage of the new
structured log or new log levels. Those changes will come in future
commits.
2016-12-14 10:45:15 -06:00
Allen Petersen da9941b9a9 Reject invalid subscription urls
The url must have a scheme of udp,http,https and a port number.
CREATE SUBSCRIPTION will fail if there are invalid destinations.

Additionally Service.createSubscription fail invalid destinations are detected.

Fixes #7615
2016-12-07 12:54:41 -08:00
Cory LaNou 6f027ac60e Merge pull request #7702 from influxdata/cjl-6527-cli-precision-case-sensitive
fix precision being case sensitive in cli
2016-12-07 12:15:34 -06:00
Cory LaNou dddc3c6690
fix precision being case sensitive in cli 2016-12-07 12:04:19 -06:00
Cory LaNou 4442615f15 use spaces instead of tabs for CLI column output format 2016-12-07 11:21:04 -06:00
Cory LaNou a90a1f4b7f
cli was caching db/rp for insert into statements 2016-12-07 09:22:48 -06:00
Michael Desa cb3f4de336 Add influx_stress deprecation note to changelog. 2016-12-06 14:00:23 -05:00
Edd Robinson c558f29e54 Merge pull request #7686 from influxdata/er-go.1.7.4
Update Go version to 1.7.4
2016-12-06 16:26:46 +00:00
Edd Robinson 30bea335a4 Update Go version to 1.7.4 2016-12-05 11:23:48 +00:00
Edd Robinson 840fb6af38 Ensure unsafessl option passed to importer 2016-12-02 18:26:47 +00:00
Edd Robinson aff2d7ce64 Ensure user privs dropped along with db (#7677) 2016-12-02 18:23:35 +00:00
Jonathan A. Sternberg cbb689e706 Uncomment section headers from the default configuration file
It would be potentially confusing for someone if they uncommented a line
in the default configuration file, but forgot to also uncomment the
section header. The section headers don't cause any actual change to the
underlying configuration file so I've uncommented them to reduce
potential confusion.
2016-12-02 09:24:31 -06:00
Jonathan A. Sternberg bffc759cf9 Return the time from a percentile call on an integer
`percentile()` is supposed to be a selector and return the time of the
point, but that only got changed when the input was a float. Updating
the integer processor to also return the time of the point rather than
the beginning of the interval.
2016-12-01 12:34:48 -06:00
Cory LaNou d54d32b9d4
prune shards in meta data 2016-12-01 11:22:16 -06:00
Jonathan A. Sternberg 3427c7b356 Update changelog for #7356 (PR #7662) 2016-12-01 10:41:39 -06:00
Allen Petersen 31129ab0e9 Use slash separator for filenames in tar archives
NO-OP on platforms with unix path separator.
On Windows paths get converted to slashes before adding to archive and back to backslashes during restore.
2016-11-29 09:44:08 -08:00
Jonathan A. Sternberg 933702549d Merge pull request #7368 from influxdata/js-partial-in-json-response
Introduce syntax for marking a partial response with chunking
2016-11-29 11:17:24 -06:00
Jonathan A. Sternberg b4db76cee2 Introduce syntax for marking a partial response with chunking
The `partial` tag has been added to the JSON response of a series and
the result so that a client knows when more of the series or result will
be sent in a future JSON chunk.

This helps interactive clients who don't want to wait for all of the
data to know if it is done processing the current series or the current
result. Previously, the client had to guess if the next chunk would
refer to the same result or a new result and it had to match the name
and tags of the two series to know if they were the same series. Now,
the client just needs to check the `partial` field included with the
response to know if it should expect more.

Fixed `max-row-limit` so it counts rows instead of results and it
truncates the response when the `max-row-limit` is reached.
2016-11-22 11:16:22 -06:00
Edd Robinson 28ba8ced74 Fixes #7625 2016-11-17 16:31:36 +00:00
Jason Wilder 63554ce5a3 Update changelog
Add #7616
2016-11-16 17:05:47 -07:00
Jason Wilder 62177826d5 Merge branch '1.1' into jw-merge-11 2016-11-16 11:16:44 -07:00
Jonathan A. Sternberg e885fe5117 Expand string and boolean fields when using a wildcard with sample() 2016-11-15 15:56:47 -06:00
Jason Wilder 800da5732b Update release date 2016-11-11 16:25:22 -07:00
Jason Wilder 77e2c80a4f Merge pull request #7435 from marcv81/feature-7066
Support for collectd signed and encrypted packets
2016-11-11 11:30:24 -07:00
Jonathan A. Sternberg b87116449c Avoid deadlock when max-row-limit is hit
When the `max-row-limit` was hit, the goroutine reading from the results
channel would stop reading from the channel, but it didn't signal to the
sender that it was no longer reading from the results. This caused the
sender to continue trying to send results even though nobody would ever
read it and this created a deadlock.

Include an `AbortCh` on the `ExecutionContext` that will signal when
results are no longer desired so the sender can abort instead of
deadlocking.
2016-11-08 14:48:16 -06:00
Jonathan A. Sternberg 64c2d704da Avoid deadlock when max-row-limit is hit
When the `max-row-limit` was hit, the goroutine reading from the results
channel would stop reading from the channel, but it didn't signal to the
sender that it was no longer reading from the results. This caused the
sender to continue trying to send results even though nobody would ever
read it and this created a deadlock.

Include an `AbortCh` on the `ExecutionContext` that will signal when
results are no longer desired so the sender can abort instead of
deadlocking.
2016-11-08 13:12:28 -06:00
Marc 05d929caa9 Update CHANGELOG.md 2016-11-08 08:42:14 +08:00
Jason Wilder e10776081a Disable/deprecate admin interface 2016-11-07 13:33:36 -07:00
Jason Wilder b6863b04d1 Disable/deprecate admin interface 2016-11-07 12:04:51 -07:00
Cory LaNou e112de2ee0 Merge pull request #7554 from influxdata/cjl-godeps
update latest dependencies with Godeps
2016-11-07 09:10:30 -06:00
Cory LaNou 3774d5e734
update latest dependencies with Godeps 2016-11-07 08:49:29 -06:00
Cory LaNou cd272ce6c3 fix retention policy creation inconsistencies 2016-11-03 09:09:43 -05:00
Jonathan A. Sternberg e7d4a601a6 Fix incorrect grouping when multiple aggregates are used with sparse data
When a query would use a grouping with two different aggregates, it was
possible for one of the aggregates to return a value from a different
series key than the second aggregate. When these series keys didn't
match, the returned grouping would be screwed up because it sorted by
time before checking for name and tags.

This did not happen when the aggregates returned values for the same
series keys because then the iterators were aligned with each other.
2016-11-02 14:29:31 -05:00
Jonathan A. Sternberg 1b2fa645ee Fix incorrect grouping when multiple aggregates are used with sparse data
When a query would use a grouping with two different aggregates, it was
possible for one of the aggregates to return a value from a different
series key than the second aggregate. When these series keys didn't
match, the returned grouping would be screwed up because it sorted by
time before checking for name and tags.

This did not happen when the aggregates returned values for the same
series keys because then the iterators were aligned with each other.
2016-11-02 13:35:22 -05:00
Jason Wilder 7f1f1b002d Highly new query features 2016-10-31 12:47:36 -06:00
Jonathan A. Sternberg ce1831160d Fix output duration units for SHOW QUERIES
The previous version was showing the microseconds unit when it was
outputting nanoseconds. Now we correctly identify which sub-second unit
to use (milliseconds, microseconds, or nanoseconds) and use the correct
unit while dividing the duration unit correctly to produce the correct
output.

Also updated to use the default duration string instead of our own
custom formatters. It turns out that the string method for
`time.Duration` does the correct thing as long as we truncate the value
first.
2016-10-31 12:48:01 -05:00
Jonathan A. Sternberg 3e29d3d9ca Truncate the version string when linking to the documentation
The admin console would dynamically discover the version from the
InfluxDB server, but for patch releases, it included the patch in the
link to the documentation and that wasn't a valid link.

Truncate the version so the documentation url is correct since we only
do documentation for `major.minor`.
2016-10-27 16:40:08 -05:00
Jonathan A. Sternberg f1fbb55909 Change default time boundaries for raw queries
Changes the default time boundaries for raw queries so raw queries will
range until the end of time. Aggregate queries continue to have their
default end time be `now()`.
2016-10-25 15:08:51 -05:00
Jonathan A. Sternberg 17eb8cb476 Merge pull request #7497 from influxdata/js-6704-first-last-optimization
Optimize first/last when no group by interval is present
2016-10-25 14:33:55 -05:00
Cory LaNou cc8e34886c escape fields when exporting tsm/wal files 2016-10-25 13:36:45 -05:00
Jason Wilder af72d9b0e4 Merge pull request #7515 from influxdata/jw-7053
Return parse error from delete/drop when db or rp is specified
2016-10-25 12:05:56 -06:00
Jason Wilder c68b7a192f Return parse error from delete/drop when db or rp is specified
The delete and drop statements apply to the measurement within a db.
The parser allowed a db or rp to be specified and these values were
silently ignored.  This could cause data loss as someone would think
they are only deleting the series within a rp, but they are actually
deleting all their data.

Instead, we return a parse error if a db or rp is specified in the
delete or drop statements.  Ideally, we'd be able to respect the
db and rp, but that requires significant work in the query engine
and tsdb store to make that work.

Fixes #7053
2016-10-25 11:43:15 -06:00
Jonathan A. Sternberg a515aeda39 Optimize first/last when no group by interval is present
The `first()` and `last()` functions response rate would increase linear
to the number of points even though it seems like it shouldn't. This
optimization greatly reduces the amount of time to return a response
when no `GROUP BY time(...)` clause is present in a query.
2016-10-25 09:57:31 -05:00
Edd Robinson 06d1226b9a Rewrite exact match regexes to use tsdb index
This commit adds support for replacing regexes with non-regex conditions
when possible. Currently the following regexes are supported:

 - host =~ /^foo$/ will be converted into host = 'foo'
 - host !~ /^foo$/ will be converted into host != 'foo'

Note: if the regex expression contains character classes, grouping,
repetition or similar, it may not be rewritten.

For example, the condition: name =~ /^foo|bar$/ will not be rewritten.
Support for this may arrive in the future.

Regexes that can be converted into simpler expression will be able to
take advantage of the tsdb index, making them significantly faster.
2016-10-25 11:10:03 +01:00
Jason Wilder 6249c8b9ab Update changelog 2016-10-24 16:13:45 -06:00
Edd Robinson 0ee093f1fb Memoize output of FileStore.Stats 2016-10-24 10:23:20 -06:00
Cory LaNou e35178870e Merge pull request #7493 from influxdata/cjl-7431-remove-cq-endpoint-httpd
Remove ProcessContinousQueries from httpd endpoint
2016-10-21 13:02:19 -05:00
Jonathan A. Sternberg 3681bc8a43 Filter out series within shards that do not have data for that series
Previously, we would return a full tag set for every shard and the tag
set would include all series that existed in the database index
including series that didn't physically exist within that shard. This
led to the tag sets returned being incredibly huge when we had high
cardinality but sparse data. Since the data was sparse, it was
unexpected that it would cause such a large strain on the system by most
people.

Now we filter out the series ids that are not assigned to the current
shard when computing a tag set for that shard. This lowers the memory
usage for high cardinality sparse data drastically and allows queries on
those to complete successfully.

This does not resolve issues for high cardinality data in every shard
that is also spread out over a long series of time. That situation isn't
nearly as common as the above situation though.
2016-10-20 14:15:34 -05:00
Cory LaNou 5b72b874d8
remove ProcessContinousQueries from httpd endpoint 2016-10-20 11:22:36 -05:00
Edd Robinson e88192b282 Fixes issue with point hitting wrong shard
If a point was written that was earlier than any existing shards
it would be written to the earliest existing shard that had an
end time later than the point's time.

This ensures that when a point is written and there are no shards that
the point will fit into exactly, a new shard group will be created.
2016-10-19 21:06:29 +01:00
Jason Wilder 2e473e9518 Fix panic in AppendSeriesKeyByID
Calling this function with a series ID that does not exist in
the measurement causes a panic.

Fixes #7334
2016-10-19 11:07:19 -06:00
Mark Rushakoff 377c40f122 Add stats for active compactions
Unify logic around compaction execution to a single place.

Also report on the error stats that we track. Previously they were not
emitted in the stats output.
2016-10-18 14:12:21 -07:00
Jason Wilder 8f3da43ebb Merge pull request #7165 from influxdata/jw-deletes
Allow snapshot compactions during deletes
2016-10-18 14:27:16 -06:00
Jason Wilder 80cc956fb6 Fix changelog 2016-10-18 14:14:58 -06:00
Jonathan A. Sternberg 19a61dbb44 Align binary math expression streams by time
Also fills in missing values using the fill expression for any binary
aggregation.
2016-10-18 13:31:13 -05:00
Jason Wilder f254b4f3ae Allow snapshot compactions during deletes
If a delete takes a long time to process while writes to the
shard are occuring, it was possible for the cache to fill up
and writes to be rejected.  This occurred because we disabled
all compactions while writing tombstone file to prevent deleted
data from re-appearing after a compaction completed.

Instead, we only disable the level compactions and allow snapshot
compactions to continue.  Snapshots already handle deleted data
with the cache and wal.

Fixes #7161
2016-10-18 12:14:51 -06:00
Edd Robinson ad2d33f859 Ensure input services can be safely opened and closed 2016-10-18 10:35:38 +01:00
Jonathan A. Sternberg 2f5f995782 Correctly read in input from a non-interactive stream for the CLI
If you pipe in a file to the `influx` CLI, it will not try to open the
interactive line reader, but instead just send the contents of the
entire file to the server.
2016-10-17 12:58:44 -05:00
Jonathan A. Sternberg e457cefb24 Support INFLUX_USERNAME and INFLUX_PASSWORD for setting username/password in the CLI 2016-10-17 12:26:39 -05:00
Jonathan A. Sternberg 41e4e73d4e Reduce map allocations when computing the TagSets of a measurement
Instead of assigning a boolean value of true to the filter expressions
when there was no meaningful expression, this drops a boolean expression
of true from the filter expressions so we don't have to perform a map
assignment. This allows us to reduce allocations and assignments when a
`WHERE` clause only contains tag comparisons and no field comparisons.
2016-10-17 12:13:19 -05:00
Jonathan A. Sternberg 3496c5b85f Merge pull request #7442 from influxdata/js-5955-make-regex-work-on-field-keys-in-select
Support using regexes to select fields and dimensions
2016-10-17 11:37:47 -05:00
Jonathan A. Sternberg b60b4b371e Support using regexes to select fields and dimensions
The functionality works the same as wildcards, but this time, you can
specify a regular expression.

One limitation is that you can't specify whether you only want to select
fields or tags. Since the regex can be changed to suit the person's
needs, I don't currently think this is an issue.
2016-10-13 22:17:14 -05:00
Jonathan A. Sternberg 95859b8ab4 Remove accidentally added string support for the stddev call
Strings would always return an empty string and stddev is meaningless
when it comes to strings. This removes that functionality so strings
don't automatically get picked up when using a wildcard.
2016-10-10 14:58:28 -05:00
Jason Wilder bbecb3f03d Drop points that would execeed limits
This changes the behavior of the max-series-per-database and
max-values-per-tag limits to drop points that would exceed the limits
and allow the remaining points to be written.  Previously, the whole
batch would fail and return and 500 error to the client.

This now will write the allow points and return a `partial write`
error indicating some of the points were dropped, how many were
dropped and one of the problem measureent and tags.
2016-10-10 11:42:15 -06:00
Jason Wilder 8fce6bba48 Add tag value cardinality limit 2016-10-10 11:42:15 -06:00
Mark Rushakoff 5ae8cf8312 Speed up shutdown
On my machine with about 20 shards, it would take 10+ seconds to shut
down InfluxDB with SIGINT. After this change, it shuts down in nearly
instantly.

(*tsdb.Store).Close was shutting down each of its shards sequentially.
Each shard's engine would signal to its compaction goroutines to quit,
and because each compaction goroutine has a hardcoded 1-second sleep in
between checks, waiting for the goroutines would often block for up to a
second.

This change closes all of the TSDB store's shards in parallel. This
means it's possible that multiple close values could error at once, but
we're still only returning the first error, consistent with previous
behavior. That being said, the return value of (*tsdb.Store).Close is
ignored in (*cmd/influxd/run.Server).Close anyway.
2016-10-10 09:18:47 -07:00
Jonathan A. Sternberg 6afc2a77a5 Implement cumulative_sum() function
The `cumulative_sum()` function can be used to sum each new point and
output the current total. For the following points:

    cpu value=2 0
    cpu value=4 10
    cpu value=6 20

This would output the following points:

    > SELECT cumulative_sum(value) FROM cpu
    time    value
    ----    -----
    0       2
    10      6
    20      12

As can be seen, each new point adds to the sum of the previous point and
outputs the value with the same timestamp.

The function can also be used with an aggregate like `derivative()`.

    > SELECT cumulative_sum(mean(value) FROM cpu WHERE time >= now() - 10m GROUP BY time(1m)
2016-10-07 10:11:53 -05:00
Michael Desa 616d4d28d3 Merge pull request #7415 from influxdata/md-sample
Add sample function to query language
2016-10-06 10:04:16 -07:00
Michael Desa f9b8129770 Add sample function to query language
First Pass at implementing sample

Add sample iterators for all types

Remove size from sample struct

Fix off by one error when generating random number

Add benchmarks for sample iterator

Add test and associated fixes for off by one error

Add test for sample function

Remove NumericLiteral from sample function call

Make clear that the counter is incr w/ each call

Rename IsRandom to AllSamplesSeen

Add a rng for each reducer that is created

The default rng that comes with math/rand has a global lock. To avoid
having to worry about any contention on the lock, each reducer now has
its own time seeded rng.

Add sample function to changelog
2016-10-06 09:41:42 -07:00
Jason Wilder ebf50d06ca Merge branch '1.0' into jw-merge-102 2016-10-06 09:51:35 -06:00
Jason Wilder ff30704705 Update 1.0.2 release date 2016-10-05 13:19:17 -06:00
Michael Desa fc57c0f7c6 Merge pull request #7403 from influxdata/md-fill-average
Add fill(linear) to query language
2016-10-05 10:40:02 -07:00
Michael Desa 966e5503bf Add fill(linear) to query language
Clean up template for fill average

Change fill(average) to fill(linear)

Update average to linear in infuxql spec

Add Integer Tests and associated fixes

Update CHANGELOG for fill(linear)
2016-10-04 14:27:04 -07:00
Jason Wilder ea21588b9e Fix subscriber service dropping writes under high write load
The subscriber write goroutine would drop points if the write load
was higher than it could process.  This could happen with a just
a few writers to the server.

Instead, process the channel with multiple writers to avoid dropping
writes so easily.  This also adds some config options to control how
large the channel buffer is as well as how many goroutines are started.

Fixes #7330
2016-10-04 14:47:36 -06:00
Nathaniel Cook 91645c05cf Merge pull request #7392 from mglazer/feature/https-subscriber
Fix Kapacitor Issue #942: HTTPS subscriptions don't work
2016-10-04 14:45:05 -06:00
Mike Glazer 1feca0623c CHANGELOG updated 2016-10-04 20:58:37 +02:00
Jason Wilder f727effd7f Merge pull request #7385 from influxdata/jw-query-allocs
Reduce query planning allocations
2016-10-03 09:08:36 -06:00
Jason Wilder ac4ae1a866 Update changelog for backported issue 2016-10-03 08:58:15 -06:00
Jason Wilder 4f37cc6572 Fix backport issues 2016-10-03 08:31:32 -06:00