Commit Graph

14730 Commits (1.9)

Author SHA1 Message Date
Sam Arnold 8bd4a61198
fix: a few suddenly flaky tests involving randomness (#21818) (#21822)
Closes #21817

(cherry picked from commit c240c7906e)
2021-07-09 13:48:03 -04:00
Sam Arnold 2d857dfbc9
chore: update flux to v0.120.1 (#21820) (#21821)
(cherry picked from commit 8ea5900ad6)
2021-07-09 13:47:56 -04:00
Sam Arnold d23f2d6468
chore: changelog for recent backports (#21810) 2021-07-08 12:25:17 -04:00
Sam Arnold 6f9f5515bb
fix: error instead of panic for statement rewrite failure (#21792) (#21809)
(cherry picked from commit 98361e2073)
2021-07-08 10:51:44 -04:00
Sam Arnold d38f5f53ce
feat: add total-buffer-bytes config parameter to subscriptions (#21752) (#21806)
* 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

(cherry picked from commit 85abb3af36)
2021-07-08 10:50:38 -04:00
Sam Arnold 1aaaee30d8
fix: show shards gives empty expiry time for inf duration shards (#21795) (#21807)
(cherry picked from commit 8fa4d82ce7)
2021-07-08 10:50:10 -04:00
Cody Shepherd ae0a3e26d7
fix: convert arm arch names for rpms during builds via docker (#21776)
* fix: convert arm arch names for rpms during builds via docker

* chore: update changelog
2021-07-02 08:23:23 -07:00
davidby-influx 8577807212
fix: do not send non-UTF-8 characters to subscriptions (#21558) (#21764)
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

(cherry picked from commit a08b69098e)

Closes https://github.com/influxdata/influxdb/issues/21559
2021-06-29 16:53:32 -07:00
Cody Shepherd 7a710fb3a5
fix: rename arm rpms with yum-compatible names (#21751) 2021-06-29 08:02:35 -07:00
davidby-influx 392bc1213c
chore: add logging to compaction (#21707) (#21710)
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

(cherry picked from commit 73bdb2860e)

Closes https://github.com/influxdata/influxdb/issues/21705
2021-06-17 09:26:03 -07:00
davidby-influx ae851d92f7
fix: do not panic on cleaning up failed iterators (#21666) (#21697)
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

(cherry picked from commit acc4105b8c)

Closes #21667
2021-06-15 12:45:34 -07:00
davidby-influx 9355183430
fix: Do not close connection twice in DigestWithOptions (#21659) (#21695)
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

(cherry picked from commit bce6553459)

Closes https://github.com/influxdata/influxdb/issues/21657
2021-06-15 11:49:49 -07:00
Sam Arnold 1661b6f67d
fix: avoid rewriting fields.idx unnecessarily (#21692)
* fix: avoid rewriting fields.idx unnecessarily (#21592) [Port to 1.9] (#21609)

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

(cherry picked from commit f64be286be)

Closes #21597

* chore: minor refactor suggested by go lint (#21614) (#21616)

(cherry picked from commit 7d10228e19)
(cherry picked from commit f8202876ad)

Co-authored-by: davidby-influx <72418212+davidby-influx@users.noreply.github.com>
2021-06-15 12:36:52 -04:00
Sam Arnold 260876c834
chore: backport group-by fix and revert fields.idx from 1.9.2 (#21634)
* 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

(cherry picked from commit 894f54e6ac)

* revert: "chore: minor refactor suggested by go lint (#21614) (#21616)"

This reverts commit 1b27b8dff5.

* revert: "fix: avoid rewriting fields.idx unnecessarily (#21592) [Port to 1.9] (#21609)"

This reverts commit c8e80251a9.
2021-06-08 11:43:38 -04:00
davidby-influx 1b27b8dff5
chore: minor refactor suggested by go lint (#21614) (#21616)
(cherry picked from commit 7d10228e19)
(cherry picked from commit f8202876ad)
2021-06-04 15:15:15 -07:00
davidby-influx c8e80251a9
fix: avoid rewriting fields.idx unnecessarily (#21592) [Port to 1.9] (#21609)
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

(cherry picked from commit f64be286be)

Closes #21597
2021-06-04 10:31:48 -07:00
Sam Arnold 482a27b085
fix: FGA enablement (#21512)
Closes #21515
2021-05-19 16:44:44 -04:00
davidby-influx 33f0bb3f2c
chore(ae): add more logging (#21381) (#21489)
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/21449
2021-05-17 14:40:02 -07:00
Sam Arnold b26a2f7a0e
fix: disable MergeFiltersRule until it is more stable (#21359)
Add a test to make sure this stays fixed.

(cherry picked from commit f5e6dd44d5)
2021-05-03 15:32:52 -04:00
Sam Arnold 2ab49e3b58
fix(storage): cursor requests are [start, stop] instead of [start, stop) (#21347) (#21348)
* 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>
(cherry picked from commit 8edf7a4e2f)
2021-04-30 15:59:08 -04:00
Sam Arnold aa18ef6cdd
fix: summation should be in native type for mean,count iterator (#21334) (#21341)
(cherry picked from commit 4cf19f8254)
2021-04-30 14:58:52 -04:00
Sam Arnold d45eb2ae7d
feat: mean,count aggregation for WindowAggregate pushdown in enterprise (#21291) (#21340)
We support only one aggregate list [mean,count]. All other aggregates
still must be single-element lists.

(cherry picked from commit 32aa970eba)
2021-04-30 14:48:04 -04:00
Sam Arnold ebe3b972a0
chore: refactor to make it easier for enterprise to share functionality (#21309) (#21339)
(cherry picked from commit c6c4fc9de7)
2021-04-30 12:08:21 -04:00
davidby-influx 29b8887a60
fix: Anti-Entropy loops endlessly with empty shard (#21310)
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
(cherry picked from commit 7f300dc248)

fixes https://github.com/influxdata/influxdb/issues/21287
2021-04-28 09:20:04 -07:00
davidby-influx b685daef2d
fix(models): grow tag index buffer if needed [Backport to 1.9] (#21308)
(cherry picked from commit cae14176aa)

Co-authored-by: Tristan Su <foobar@users.noreply.github.com>
(cherry picked from commit f646cbc540)
2021-04-27 11:33:07 -07:00
Daniel Moran cfb42137c2
feat(flux): enable group > min/max pushdown (#21285)
* 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 12:15:15 -04:00
Sam Arnold fed88cf67d
feat: flux upgrade to v0.112.1 (#21226) (#21229)
(cherry picked from commit e97c5d9785)
2021-04-15 15:12:44 -04:00
Cody Shepherd befaf5c0ac
chore: remove changelog job in circle config (#21162) (#21194) 2021-04-12 11:28:07 -07:00
Sam Arnold c37d164e87
fix: flux regression in buckets query (#21183) (#21192)
(cherry picked from commit 461464f180)
2021-04-12 11:30:13 -03:00
Daniel Moran 247bb14061
feat(flux): implement rewrite rules for window and bare aggregates (#21168)
* 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-08 14:04: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
Sam Arnold 274f33b3f4
chore: add back hashing of build tarball (#20981) 2021-03-17 10:13:34 -04:00