Commit Graph

14918 Commits (db/6263/compaction-debug-logging)

Author SHA1 Message Date
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
Sam Arnold 274f33b3f4
chore: add back hashing of build tarball (#20981) 2021-03-17 10:13:34 -04:00
Sam Arnold 52f939eadf
chore: fix oss unit tests (#20972) 2021-03-16 11:56:28 -04:00
Sam Arnold 1e53bf13e0
chore: fix release build scripts (#20970)
Note: this commit fixes linux/amd64 and darwin/amd64 builds. We are still
working on fixes for linux/arm64 and windows/amd64.

Partial fix of https://github.com/influxdata/influxdb/issues/20854
2021-03-16 09:23:55 -04:00
Sam Arnold 178a1d0c3b
chore: 1.9.0 rc0 changelog (#20948)
* chore: reset changelog to 1.8.5

* chore: update changelog in preparation for 1.9.0rc0
2021-03-15 12:34:04 -04:00
Sam Arnold dd6abe6f19
fix(flux): add durations to Flux logging (#19697) (#20940)
(cherry picked from commit 25fb1077e2)

Co-authored-by: Christopher M. Wolff <chris.wolff@influxdata.com>
2021-03-15 12:33:57 -04:00
Sam Arnold 532a23da84
chore: remove Jenkinsfile (#20951)
The unit tests are run by circleci and the changelog updates are not working
currently.
2021-03-15 12:33:29 -04:00
Sam Arnold 849221b709
fix: storage read service should not return a nil cursor (#17359) (#20941)
The storage read service would return a nil cursor if there was no data
and no shards to read from. This modifies it to return an empty cursor
instead.

(cherry picked from commit 2852bf0399)

Co-authored-by: Jonathan A. Sternberg <jonathan@influxdata.com>
2021-03-12 16:36:08 -05:00
Sam Arnold df46a86326
fix(tls): Enable configuration of TLS 1.3 (#20939)
Co-authored-by: Gunnar Aasen <gunnar.r.aasen@gmail.com>
2021-03-12 16:35:28 -05:00
Sam Arnold aa2fcd295f
fix(logger): Ensure default level value is info (#17403) (#20937)
(cherry picked from commit 4d5a688a1e)

Co-authored-by: Ayan George <ageorge@influxdata.com>
2021-03-12 16:34:51 -05:00
Sam Arnold 5ef0d38bc7
fix(flux): buckets call no longer panics (#17319) (#20936)
The buckets call had a column removed and the backport did not remove
that line. This modifies the buckets command to not append a row to a
column that no longer exists.

(cherry picked from commit 637ca24d5e)

Co-authored-by: Jonathan A. Sternberg <jonathan@influxdata.com>
2021-03-12 16:34:40 -05:00
Sam Arnold b0cf385491
fix(storage): ArrayFilterCursor truncation for multi-block data (#19439) (#20935)
Backport abfe5a54a0

(cherry picked from commit 77d1a4180b)

Co-authored-by: Yiqun (Ethan) Zhang <github@yzhang.io>
2021-03-12 16:34:31 -05:00
Sam Arnold 04f4817aae
fix(services/storage): multi measurement queries return all applicable series (#19592) (#20934)
This fixes multi measurement queries that go through the storage service
to correctly pick up all series that apply with the filter. Previously,
negative queries such as `!=`, `!~`, and predicates attempting to match
empty tags did not work correctly with the storage service when multiple
measurements or `OR` conditions were included.

This was because these predicates would be categorized as "multiple
measurements" and then it would attempt to use the field keys iterator
to find the fields for each measurement. The meta queries for these did
not correctly account for negative equality operators or empty tags when
finding appropriate measurements and those could not be changed because
it would cause a breaking change to influxql too.

This modifies the storage service to use new methods that correctly
account for the above situations rather than the field keys iterator.

Some queries that appeared to be single measurement queries also get
considered as multiple measurement queries. Any query with an `OR`
condition will be considered a multiple measurement query.

This bug did not apply to single measurement queries where one
measurement was selected and all of the logical operators were `AND`
values. This is because it used a different code path that correctly
handled these situations.

Backport of #19566.

(cherry picked from commit ceead88bd5)

Co-authored-by: Jonathan A. Sternberg <jonathan@influxdata.com>
2021-03-12 16:34:14 -05:00
Daniel Moran 3eb4fdaf33
fix(tsm1): fix data race when accessing tombstone stats (#20903) 2021-03-09 15:20:40 -05:00