Commit Graph

11022 Commits (f5e7c65fef4d73a1f6e76e55fdb3cc29d0743569)

Author SHA1 Message Date
Marco Neumann 5e287ac8e6
refactor: make `TestSetup` immutable (#6907)
* refactor: split off file creation

* refactor: make `TestSetup` immutable
2023-02-08 13:17:15 +00:00
Marco Neumann 6f7f608685
refactor: avoid nested test modules (#6906)
Just call it `tests` and avoid nesting a module in a module.

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-02-08 11:16:36 +00:00
dependabot[bot] 0ecde75af5
chore(deps): Bump object_store from 0.5.3 to 0.5.4 (#6900)
Bumps [object_store](https://github.com/apache/arrow-rs) from 0.5.3 to 0.5.4.
- [Release notes](https://github.com/apache/arrow-rs/releases)
- [Changelog](https://github.com/apache/arrow-rs/blob/master/CHANGELOG-old.md)
- [Commits](https://github.com/apache/arrow-rs/compare/object_store_0.5.3...object_store_0.5.4)

---
updated-dependencies:
- dependency-name: object_store
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-02-08 09:40:11 +00:00
Marco Neumann dcba47ab58
feat: allow the compactor to process all known partitions (#6887)
* feat: `PartitionRepo::list_ids`

* refactor: `CatalogPartitionsSource` => `CatalogToCompactPartitionsSource`

* feat: allow the compactor to process all known partitions

Closes #6648.

* docs: improve

Co-authored-by: Andrew Lamb <alamb@influxdata.com>

---------

Co-authored-by: Andrew Lamb <alamb@influxdata.com>
2023-02-08 09:32:21 +00:00
dependabot[bot] bb825faf06
chore(deps): Bump toml from 0.7.1 to 0.7.2 (#6899)
Bumps [toml](https://github.com/toml-rs/toml) from 0.7.1 to 0.7.2.
- [Release notes](https://github.com/toml-rs/toml/releases)
- [Commits](https://github.com/toml-rs/toml/compare/toml-v0.7.1...toml-v0.7.2)

---
updated-dependencies:
- dependency-name: toml
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-08 09:11:04 +00:00
Andrew Lamb 47b47f225b
chore: add more insta snapshots for initial setup (#6894)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-02-07 23:44:59 +00:00
Stuart Carnie a2945a77a4
fix: Implement EXPLAIN, ORDER BY and default ordering (#6864)
* chore: Add more tests

* chore: Fix default ordering; implement ORDER BY

* feat: Add EXPLAIN support

* chore: Add additional tests to validate GROUP BY expansion

* chore: More test cases for TZ, and failing log scalar function
2023-02-07 22:18:52 +00:00
Andrew Lamb d4e07eb6ac
chore: Update target_level_upgrade_split to use insta snapshots for partition verificiation (#6892) 2023-02-07 20:36:46 +00:00
Andrew Lamb ea0fc79340
chore: Update tests in compactor2 to ue insta (#6891)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-02-07 19:58:43 +00:00
Nga Tran beb22f0490
Merge pull request #6880 from influxdata/ntran/c2-skip
feat: Do not skip partition based on num files and size until we reach compaction plan
2023-02-07 14:19:50 -05:00
NGA-TRAN c5025d6271 chore: merge main to branch 2023-02-07 14:04:03 -05:00
NGA-TRAN aab6ac7424 refactor: address review comments 2023-02-07 13:35:11 -05:00
Nga Tran 76172daf39
feat: to prevent OOMs/crrash that will lead to skip compaction, let us compact L1 files when they are large enough (#6877)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-02-07 17:46:44 +00:00
Dom Dwyer 776ec41384
fix(ingester2): always maintain persist interval
This fixes an issue where persistence that does not ever complete blocks
the periodic enqueuing of persist tasks - this leads to the amount of
buffered data in the buffer tree increasing, and the persist queue depth
stays the same instead of draining the buffer.

This is an issue as the queue depth is designed to act as the
back-pressure of the ingester - once the depth exceeds a configurable
limit, further writes are rejected until the queue has drained
sufficiently (50%).

After this commit, stalled persistence (i.e. object store outage) will
not prevent the queue depth from growing, which should enable the
saturation protection to kick in.
2023-02-07 17:48:07 +01:00
NGA-TRAN db51d77eb8 docs: even more detailed info about skipped partitions 2023-02-07 10:13:58 -05:00
Andrew Lamb f56023b222
feat: use insta_snapshots (#6884)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-02-07 15:08:47 +00:00
Dom Dwyer 4ffd7fcc68
test: persist timer & wal rotation
Adds a unit test covering WAL rotation, buffer persistence & WAL file
deletion.
2023-02-07 15:52:11 +01:00
Nga Tran 6297ad206f
Merge branch 'main' into ntran/c2-skip 2023-02-07 09:38:23 -05:00
NGA-TRAN 646349c52d docs: addd comments to explain further the skip 2023-02-07 09:34:40 -05:00
Marco Neumann 997cca67a3
fix: `--compaction-process-once` should exit (#6886)
- do not wait for a non-empty partition result (this doesn't make sense
  if we are not running endlessly)
- modify entry point to allow the compactor to exit on its own (this is
  normally not allowed for other server types)
2023-02-07 13:52:17 +00:00
Marco Neumann e179887ede
fix: metric buckets (#6883) 2023-02-07 12:07:45 +00:00
Marco Neumann 3a4364b8f8
fix: partition-done metrics/logs (#6882)
Ignore partitions that where throttled or filtered due to the "not
unique" combo.

This is in line w/ the "partitions source", so the metric for "partition
in" and "partition out" line up.

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-02-07 11:01:33 +00:00
Andrew Lamb 65e7ff779c
feat: verified test output display for compactor (#6859)
* feat: verified test output display for compactor

* fix: demacrofy assert_parquet_files

* fix: demacrofiy assert_parquet_files_split

* refactor: compute min/max without sentinels

* fix: clippy

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-02-07 10:49:38 +00:00
Dom 25e1c9d7fa
Merge pull request #6873 from influxdata/dom/cache-table-limit
perf(router): cheap table limit enforcement + better errors
2023-02-07 10:13:05 +00:00
Dom 9e8785f9c1
Merge branch 'main' into dom/cache-table-limit 2023-02-07 10:04:50 +00:00
NGA-TRAN 6ec44d697a chore: cleanup 2023-02-06 21:41:35 -05:00
NGA-TRAN 24ebd923a2 chore: Merge branch 'ntran/c2-skip' of https://github.com/influxdata/influxdb_iox into ntran/c2-skip 2023-02-06 21:39:24 -05:00
NGA-TRAN 56ca3186b6 chore: turn test assert on 2023-02-06 21:39:17 -05:00
Nga Tran bce7dba856
Merge branch 'main' into ntran/c2-skip 2023-02-06 21:35:20 -05:00
NGA-TRAN 32715595bb chore: cleanup 2023-02-06 21:32:06 -05:00
NGA-TRAN bdf3e32dcd test: tests for partition filters of resource limit 2023-02-06 21:26:45 -05:00
Christopher M. Wolff a79b4ec899
refactor: better validation of gap filling queries (#6875)
* refactor: propagate origin argument to gap fill operator

* refactor: add param expressions to from_template

* chore: add more validation for gap fill queries

* feat: extract stride, first and last from gap fill params

* chore: clippy

* refactor: code review feedback

* chore: update for changed result type

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-02-06 23:36:26 +00:00
Stuart Carnie eb245d6774
feat: Initial SQLite catalog schema (#6851)
* feat: Initial SQLite catalog schema

* chore: Run cargo hakari tasks

* feat: impls, many TODOs

* feat: completed `todo!()`'s

* chore: add remaining tests from postgres module

* feat: add SQLite to get_catalog API

* chore: Add docs

* chore: Placate clippy

* chore: Placate clippy

* chore: PR feedback from @domodwyer

---------

Co-authored-by: CircleCI[bot] <circleci@influxdata.com>
2023-02-06 22:55:14 +00:00
NGA-TRAN 9f2fecde90 feat: first step to skip partition until we know what files to compact 2023-02-06 17:30:15 -05:00
Andrew Lamb 452b69cd2c
docs(compactor): Update comments about what `PartitionFilter` does (#6878)
* docs(compactor): Update comments about what `PartitionFilter` does

* fix: Update compactor2/src/components/partition_filter/mod.rs

* fix: fmt

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-02-06 21:44:32 +00:00
Andrew Lamb 50514a91ff
refactor: reduce duplication for compactor_tests (#6879) 2023-02-06 21:08:12 +00:00
Andrew Lamb ec42aa0ba9
refactor: Consolidate end to end normalization code (#6848) 2023-02-06 19:47:14 +00:00
Carol (Nichols || Goulding) f1f475d552
fix: Remove compactor generate (#6872)
This debugging tool was more useful in previous situations where it was
harder to get real data as input for the compactor.

It's currently causing a flaky test that isn't worth investigating.

Fixes #6190 by making it moot.

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-02-06 19:19:15 +00:00
Andrew Lamb 0c6b685ee1
refactor: add / cleanup some comments in compactor2 (#6853)
* refactor: add / cleanup some comments in compactor2

* fix: clarify comments after talking Nga

* fix: Update comments
2023-02-06 19:11:10 +00:00
Nga Tran 8689017f8f
chore: debug info (#6874)
* chore: debug info

* chore: Apply suggestions from code review
2023-02-06 18:16:33 +00:00
Dom Dwyer bf6ab7fd88
fix: error message typo
columns -> tables for table limit error.
2023-02-06 18:03:26 +01:00
Dom Dwyer 3f2eb54bce
test(router): catalog service limit errors
Assert the service limit error messages from the catalog.
2023-02-06 17:55:09 +01:00
Dom Dwyer 3881e11734
test(router): service limit error messages
Assert the user-facing service limit error messages.
2023-02-06 17:43:37 +01:00
Dom Dwyer 114bafe9a1
perf(router): cached table limit enforcement
Use the namespace schema cache in the router to enforce the
per-namespace table limit (service protection limit), adding O(1)
overhead to the existing column limit evaluation logic.

Prior to this commit, each request that would breach the table limit
would be (potentially partially) applied to the catalog and return an
error. Every subsequent request creating a new table continued to cause
a catalog query, unnecessarily adding load proportional to request
counts.

After this commit, catalog requests are sent when the router instance
can determine (to the best of it's ability, see below) that the request
will not cause the namespace to exceed the table limit.

Because this uses cached schemas, the actual state set of tables may
have changed - this will cause inconsistent enforcement and spurious
errors in the same way it currently does for the column limit. For more
details (and to track a resolution) see:

    https://github.com/influxdata/influxdb_iox/issues/5957
2023-02-06 17:43:26 +01:00
Dom Dwyer dfa4ab2585
perf(router): fast-path column limit for new table
When validating column limits for new tables, skip the column set
generation and union operations against the empty existing column set.
2023-02-06 17:33:56 +01:00
Dom Dwyer a1764ee7cb
refactor: ExactSizeIterator for columns iter
Adds ExactSizeIterator bounds to the MutableBatch::column() iter,
allowing O(1) length discovery / pre-allocation optimisations for
container collection.
2023-02-06 17:33:56 +01:00
Dom Dwyer a633964f2b
feat(catalog): return max table limit in schema
The maximum number of tables is part of the Namespace, which is already
loaded in its entirety. This commit copies the value into the
NamespaceSchema, making it available for the router to utilise.
2023-02-06 17:33:55 +01:00
Dom 639964ec15
Merge pull request #6869 from influxdata/dom/http-error-ct
fix: correct http content-type header for error responses
2023-02-06 16:20:17 +00:00
Dom Dwyer b8ec022ea6
test(e2e): HTTP error response
Ensure a HTTP error response contains a well-formed JSON structure
containing "code" and "message" fields (for backwards compatibility with
existing InfluxDB versions) and a correct "content-type" header.
2023-02-06 17:10:30 +01:00
Dom Dwyer 4aa5826300
fix: return content-type for HTTP errors
No "Content-Type" header has ever been returned, even though the
response body has always been hard-coded to a JSON string.

This commit returns a content type of "application/json" for all
JSON-encoded HTTP errors.
2023-02-06 17:08:21 +01:00