Commit Graph

14781 Commits (e68b64c57bb0acfe34722b979e628a771cce7aba)

Author SHA1 Message Date
Sam Arnold 85abb3af36
feat: add total-buffer-bytes config parameter to subscriptions (#21752)
* chore: harmonize OSS and Enterprise subscriber initialization

* refactor: chanwriter close blocks until chanwriter is flushed

* refactor: remove redundant state

* test: add test for blocked subscriber during subscription update

* fix: blocked subscriber does not fail subscription update

* fix: only iterate matching subscriptions

* fix: use serialized points in subscriber queues

* feat: add total-buffer-bytes config parameter to subscriptions

* fix: put subscription serialization on the write path

* fix: subscription service only needs regular mutex, not RWMutex

* fix: review comments

* chore: update changelog
2021-07-06 15:56:01 -04:00
Sam Arnold 8fa4d82ce7
fix: show shards gives empty expiry time for inf duration shards (#21795) 2021-07-06 15:53:07 -04:00
Sam Arnold 9a3bd84d61
test: add series cardinality test and fix backup port (#21787) 2021-07-06 15:51:59 -04:00
Sam Arnold 98361e2073
fix: error instead of panic for statement rewrite failure (#21792) 2021-07-06 11:05:21 -04:00
Cody Shepherd 639527cd57
fix: convert arm arch names for rpms during builds via docker (#21777)
* fix: convert arm arch names for rpms during builds via docker

* chore: update changelog
2021-07-02 08:23:05 -07:00
Cody Shepherd e7edf9fc5f
fix: rename arm rpms with yum-compatible names (#21750) 2021-06-28 07:45:58 -07:00
Sam Arnold 4268cf3432
chore: update changelog to sync with 1.9 branch (#21738) 2021-06-23 18:34:15 -04:00
davidby-influx 73bdb2860e
chore: add logging to compaction (#21707)
Compaction logging will generate intermediate information on 
volume of data written and output files created, as well as 
improve some of the anti-entropy messages related to compaction.

This will also apply to `influx_tools compact`

Closes https://github.com/influxdata/influxdb/issues/21704
2021-06-16 15:28:44 -07:00
davidby-influx aca69e530f
fix: don't access a field in a nil struct (#21693) 2021-06-15 10:23:38 -07:00
davidby-influx acc4105b8c
fix: do not panic on cleaning up failed iterators (#21666)
We have seen occasional panics in Iterators.Close()
when cleaning up after failed iterator creation.
This commit checks for nil on any iterator to be
closed, and now returns any errors generated by
that Close().

Closes https://github.com/influxdata/influxdb/issues/19579
Closes https://github.com/influxdata/influxdb/issues/19476
2021-06-11 11:28:59 -07:00
davidby-influx bce6553459
fix: Do not close connection twice in DigestWithOptions (#21659)
tsm1.DigestWithOptions closes its network connection
twice. This may cause broken pipe errors on concurrent
invocations of the same procedure, by closing a reused
i/o descriptor. This fix also captures errors from TSM
file closures, which were previously ignored.

Closes https://github.com/influxdata/influxdb/issues/21656
2021-06-10 12:41:42 -07:00
Sam Arnold 894f54e6ac
fix: group by returns multiple results per group in some circumstances (#21631)
* fix: Revert performance improvement for sorted merge iterator

This reverts commit af8e66cd25.

* test: add end to end regression test for broken group-by

* chore: update changelog
2021-06-08 10:41:58 -04:00
davidby-influx f8202876ad
chore: minor refactor suggested by go lint (#21614)
(cherry picked from commit 7d10228e19)
2021-06-04 14:07:00 -07:00
davidby-influx f64be286be
fix: avoid rewriting fields.idx unnecessarily (#21592)
Under heavy write load creating new fields and measurements
the rewrite of the fields.idx file is a bottleneck. This
enhancement combines multiple writes into a single one and
shares any error return value with all of the combined
invocations. MeasurementFieldSet and the new 
MeasurementFieldSetWriter must both now be explicitly
closed.

Closes #21577
2021-06-04 09:21:33 -07:00
davidby-influx a08b69098e
fix: do not send non-UTF-8 characters to subscriptions (#21558)
Added a check for valid UTF-8 strings in measurement names,
tags name, tag values, and field names when writing to subscriptions. 
Do not send the failing points to subscribers, and log the errors if at
debug level logging

Closes https://github.com/influxdata/influxdb/issues/21557
2021-05-26 14:14:36 -07:00
Phillip Steinbachs 87fbb3fec9
chore: update changelog for 1.8.6 (#21532)
* chore: update changelog for 1.8.6

* chore: update changelog for 1.8.6
2021-05-21 18:07:31 -07:00
Sam Arnold c6fbc2e66f
fix: FGA enablement (#21516)
* fix: FGA enablement

Closes #21514

* fix: FGA enablement

Closes #21515
2021-05-19 17:03:21 -04:00
davidby-influx c8da9bafbf
chore(ae): add more logging (#21381) (#21452)
tsdb.Engine.IsIdle and tsdb.Engine.Digest now return a reason string for why the engine & shard are not idle.
Callers can then use this string for logging, if desired. The returned reason does not allocate memory, so the
caller may want to add the shard ID and path for more information in the log. This is intended to be used in
calls from the anti-entropy service in Enterprise.

(cherry picked from commit bf45841359)

fixes https://github.com/influxdata/influxdb/issues/21448
2021-05-11 09:46:45 -07:00
Sam Arnold 1f201472d9
fix: disable MergeFiltersRule until it is more stable (#21358)
Add a test to make sure this stays fixed.
2021-05-03 15:33:48 -04:00
Sam Arnold 8edf7a4e2f
fix(storage): cursor requests are [start, stop] instead of [start, stop) (#21347)
* fix: backport tsdb fix for window pushdowns

From https://github.com/influxdata/influxdb/pull/19855

* fix(storage): cursor requests are [start, stop] instead of [start, stop)

The cursors were previously [start, stop) to be consistent with how flux
requests data, but the underlying storage file store was [start, stop]
because that's how influxql read data. This reverts back the cursor
behavior so that it is now [start, stop] everywhere and the conversion
from [start, stop) to [start, stop] is performed when doing the cursor
request to get the next cursor.

cherry-pick from #21318

Co-authored-by: Sam Arnold <sarnold@influxdata.com>
(cherry picked from commit 7766672797)

* chore: fix formatting

Co-authored-by: Jonathan A. Sternberg <jonathan@influxdata.com>
2021-04-30 15:26:31 -04:00
Sam Arnold 4cf19f8254
fix: summation should be in native type for mean,count iterator (#21334) 2021-04-29 18:10:14 -04:00
Sam Arnold 32aa970eba
feat: mean,count aggregation for WindowAggregate pushdown in enterprise (#21291)
We support only one aggregate list [mean,count]. All other aggregates
still must be single-element lists.
2021-04-29 14:30:13 -04:00
davidby-influx 5d04f0ae20
chore: update CHANGELOG.md (#21311) 2021-04-27 16:47:10 -07:00
Sam Arnold c6c4fc9de7
chore: refactor to make it easier for enterprise to share functionality (#21309) 2021-04-27 16:18:59 -04:00
davidby-influx f646cbc540
fix(models): grow tag index buffer if needed (#20137) (#21303) (#21306)
* fix(models): grow tag index buffer if needed (#20137)

(cherry picked from commit cae14176aa)

Co-authored-by: Tristan Su <foobar@users.noreply.github.com>

fixes #21303
2021-04-27 10:44:51 -07:00
davidby-influx 7f300dc248
fix: Anti-Entropy loops endlessly with empty shard (#21275)
The anti-entropy service will loop trying to copy an empty shard to a
data node missing that shard.  This fix is one of two changes that
correctly create an empty shard on a new node. This fix will set the
LastModified date of an empty shard directory to the modification time
of that directory, instead of to the Unix epoch.

Fixes: https://github.com/influxdata/influxdb/issues/21273
2021-04-23 09:06:03 -07:00
Daniel Moran e74ece2c91
feat(flux): enable group > min/max pushdown (#21281)
* build(flux): update flux to v0.113.0
* feat(query): enable min/max pushdown
* fix(query): fix the group last pushdown to use descending cursors
* test(storage): add read group test with no agg

Co-authored-by: Jonathan A. Sternberg <jonathan@influxdata.com>
Co-authored-by: Christopher M. Wolff <chris.wolff@influxdata.com>
Co-authored-by: Faith Chikwekwe <faithchikwekwe01@gmail.com>
2021-04-23 09:52:20 -04:00
Sam Arnold e97c5d9785
feat: flux upgrade to v0.112.1 (#21226) 2021-04-15 13:41:51 -04:00
Sam Arnold 461464f180
fix: flux regression in buckets query (#21183) 2021-04-12 08:30:36 -04:00
Cody Shepherd bc09757284
chore: remove changelog job in circle config (#21162) 2021-04-09 07:09:33 -07:00
Daniel Moran 599700b41b
feat(flux): implement rewrite rules for window and bare aggregates (#21124)
* fix(storage): Detect need for descending cursor in WindowAggregate
* test: add tests for bare aggregate pushdowns
* test: add test cases for window aggregate pushdowns
* test: add tests for aggregate-by-time (aggregateWindow pushdown)


Co-authored-by: Sean Brickley <sean@wabr.io>
2021-04-07 23:03:20 -04:00
Sam Arnold fed8ca1ace
fix: redundant registration for prometheus collector metrics (#21156) 2021-04-07 12:38:00 -04:00
Daniel Moran 333cff1b15
fix(tsdb): exclude the stop time from the array cursor (#21139)
This is a backport of #14262 to the 1.x storage engine.

This also ports the table tests that existed with the pre-beta version of the
storage engine to the one that is now used in the production version.

A few of the tests are skipped. These are portions of the storage engine
that have not been ported over. They should be unskipped when that
functionality is ported over.


Co-authored-by: Jonathan A. Sternberg <jonathan@influxdata.com>
2021-04-06 14:50:07 -04:00
Cody Shepherd 56e91faf31
chore: Improve circle automation structure in prep for moving out of Jenkins (#21132)
* chore: Add workflow structure and pre-release actions to circle config

* chore: Update dockerfiles to use latest ubuntu LTS and python3 packages
2021-04-05 14:02:50 -07:00
Daniel Moran 31d4d742e8
refactor: rearrange flux-related storage code to match 2.x (#21114)
And fix CircleCI config
2021-04-01 14:25:48 -04:00
Sam Arnold f1aa051787
feat: make flux controller limits configurable (#21108)
* feat: make flux controller limits configurable

A sample of the new config:

```
[flux-controller]
  query-concurrency = 0
  query-initial-memory-bytes = 0
  query-max-memory-bytes = 0
  total-max-memory-bytes = 0
  query-queue-size = 0
```

Also use the prometheus metrics in debug/vars, here is a sample:

```
"query_control_all_active": {"name":"query_control_all_active","tags":null,"values":{"gauge":0}},
"query_control_all_duration_seconds": {"name":"query_control_all_duration_seconds","tags":null,"values":{"0.001":0,"0.005":0,"0.025":0,"0.125":0,"0.625":0,"15.625":2,"3.125":2,"count":2,"sum":2.9953034240000003}},
"query_control_compiling_active": {"name":"query_control_compiling_active","tags":null,"values":{"gauge":0}},
"query_control_compiling_duration_seconds": {"name":"query_control_compiling_duration_seconds","tags":null,"values":{"0.001":2,"0.005":2,"0.025":2,"0.125":2,"0.625":2,"15.625":2,"3.125":2,"count":2,"sum":0.0010411650000000001}},
"query_control_executing_active": {"name":"query_control_executing_active","tags":null,"values":{"gauge":0}},
"query_control_executing_duration_seconds": {"name":"query_control_executing_duration_seconds","tags":null,"values":{"0.001":0,"0.005":0,"0.025":0,"0.125":0,"0.625":0,"15.625":2,"3.125":2,"count":2,"sum":2.994032791}},
"query_control_memory_unused_bytes": {"name":"query_control_memory_unused_bytes","tags":null,"values":{"gauge":0}},
"query_control_queueing_active": {"name":"query_control_queueing_active","tags":null,"values":{"gauge":0}},
"query_control_queueing_duration_seconds": {"name":"query_control_queueing_duration_seconds","tags":null,"values":{"0.001":2,"0.005":2,"0.025":2,"0.125":2,"0.625":2,"15.625":2,"3.125":2,"count":2,"sum":0.000087963}},
"query_control_requests_total": {"name":"query_control_requests_total","tags":null,"values":{"counter":1}},
"query_control_requests_total:1": {"name":"query_control_requests_total","tags":null,"values":{"counter":1}}
```

* chore: update changelog

* fix: shorten metric names for query control

* fix: zaptest logger and goimports

* fix: races in the query controller

Previously some tests were failing due to logging after the end of the test.
2021-04-01 09:55:59 -04:00
Daniel Moran a2154f143c
feat(storage): add support for window aggregate queries (#21107)
* feat: add cursors and readers for window aggregates
* fix: backport fix + tests for race condition in flux tag cache
* test: port 2.x test for array_cursor
2021-03-31 13:51:37 -04:00
Daniel Moran 6dd2d58163
build: fix/add `go generate` calls for flux-related `.proto` files (#21103) 2021-03-30 17:14:15 -04:00
Sam Arnold b9ee9e5b44
feat: add memory and concurrency limits in flux controller (#21100)
* chore: pull in controller from 2.x

* chore: fix up 2.x controller to work with 1.x

* feat: Default query limits in flux code

Partial fix of https://github.com/influxdata/influxdb/issues/17212

* chore: update changelog

* chore: refactor to remove panic and reformat code
2021-03-30 15:02:46 -04:00
Sam Arnold 78724e5c20
chore: Add kit (#21086)
* chore: pull in unchanged kit from v2

* chore: remove v2 from import paths

* chore: update module paths and go.mod for kit

* chore: remove kit/cli again, not needed in 1.x
2021-03-30 13:09:04 -04:00
Daniel Moran fbfd4b4651
test: add fluxtest harness (#21074)
* test: add script to run flux tests
* feat(flux): enable test capabilities in Flux controller
* feat(flux): add MergeFiltersRule
* build: bump existing Dockerfiles to go 1.15
* build: add flux tests to CI
* refactor: allow for overriding tcp.Mux logger
* build: upgrade to Flux v0.111.0
2021-03-30 11:18:18 -04:00
Daniel Moran 6edfe99edf
build: set 'noasm' tag when building ARM64 binaries (#21071) 2021-03-25 11:35:55 -04:00
Sam Arnold db38959b7a
fix: fix help test for influx_inspect (#21052)
Closes #21007
2021-03-23 19:15:26 -04:00
Sam Arnold adee278c6e
build: fix windows build for go1.15 (#21041)
Closes: https://github.com/influxdata/influxdb/issues/21018

See https://github.com/golang/go/issues/40795
2021-03-23 09:08:19 -04:00
Sam Arnold d1a5c06596
chore: Upgrade to go1.15.10 and flux 0.108.1 (#21015) 2021-03-22 14:11:53 -04:00
davidby-influx 70755bf42c
feat: Log query text for POST requests (#20993)
The HTTP handler logs URLs, but not body values for POST requests.
This means that queries sent by GET are logged, because the query
is in the URL, but queries sent by POST have no query text in the
log.  This feature prints all the key-value pairs in the post body,
which includes the query text, except passwords, which are redacted. 

Closes https://github.com/influxdata/influxdb/issues/20653
2021-03-22 10:31:56 -07:00
Sam Arnold 76777680b0
build: make windows and arm64 builds possible (#21002) 2021-03-22 11:47:08 -04:00
Sam Arnold b7e7de24d6
refactor: separate coarse and fine permission interfaces (#20996) 2021-03-22 09:52:33 -04:00
davidby-influx d73df4ef53
chore: updated CONTRIBUTING.md for new package config script (#20990) 2021-03-17 14:20:53 -07:00
davidby-influx 642726e898
feat: influx_inspect export to standard out (#20977)
Add a special value to the -out flag, a hyphen, to write to stdout.
While writing to stdout, send status messages to stderr instead of
stdout (the current behavior).

Closes https://github.com/influxdata/influxdb/issues/20974
2021-03-17 10:01:40 -07:00