Commit Graph

9231 Commits (6a734e62a94fe2747427fd8d3384cbe4e6466132)

Author SHA1 Message Date
Marco Neumann e0ad5e4c20
refactor: improve "remove if" cache checks (#5673)
* refactor: use concrete backend type in `ChangeRequest`

* refactor: "remove if"-checks shall NOT count as "used"

* test: improve docs

Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>

Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
2022-09-20 11:26:07 +00:00
Marco Neumann 84e8a4ac41
fix: GC `parquet_file` table in batches (#5691)
* fix: GC `parquet_file` table in batches

Otherwise this transaction will never finish in prod.

* fix: GC shutdown

* refactor: use constant
2022-09-20 11:14:39 +00:00
Andrew Lamb 832f305b9c
chore: Do not use ANSI colorization if not connected to a tty (#5674)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-09-20 11:01:58 +00:00
Andrew Lamb 786711f244
chore: Update datafusion (#5672)
* chore: Update datafusion pin

* chore: Update expected results

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-09-20 10:19:43 +00:00
Marko Mikulicic 7fbd1a4d0c
chore: Expose all DSN flags in all-in-one (#5682)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-09-20 07:22:40 +00:00
dependabot[bot] b6fb481b0f
chore(deps): Bump dotenvy from 0.15.3 to 0.15.5 (#5689)
Bumps [dotenvy](https://github.com/allan2/dotenvy) from 0.15.3 to 0.15.5.
- [Release notes](https://github.com/allan2/dotenvy/releases)
- [Changelog](https://github.com/allan2/dotenvy/blob/master/CHANGELOG.md)
- [Commits](https://github.com/allan2/dotenvy/compare/v0.15.3...v0.15.5)

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

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-20 05:28:47 +00:00
dependabot[bot] e0b747e24e
chore(deps): Bump ordered-float from 3.0.0 to 3.1.0 (#5688)
Bumps [ordered-float](https://github.com/reem/rust-ordered-float) from 3.0.0 to 3.1.0.
- [Release notes](https://github.com/reem/rust-ordered-float/releases)
- [Commits](https://github.com/reem/rust-ordered-float/compare/v3.0.0...v3.1.0)

---
updated-dependencies:
- dependency-name: ordered-float
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-20 05:20:08 +00:00
dependabot[bot] b992d8f4db
chore(deps): Bump libc from 0.2.132 to 0.2.133 (#5686)
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.132 to 0.2.133.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.132...0.2.133)

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

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-20 05:02:22 +00:00
Stuart Carnie 56df74802c
feat: Add `DELETE` and `DROP MEASUREMENT` statements (#5656)
* chore: Refactor `FROM` clause parser to be generic

This will allow us to use it for `DELETE` statements, which has
a more restrictive requirement, only allowing regular expressions
or single part identifiers.

* feat: Add `DELETE` series statement

* chore: Add test case for insignificant whitespace between operators

NOTE: Added a skipped test until #5663 is implemented

* feat: Add `DROP MEASUREMENT` statement

* chore: Add DropMeasurementStatement struct

* chore: `Statement` enum contains only `Box`ed types

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-09-20 00:51:30 +00:00
Marko Mikulicic 5090d66eaf
Merge pull request #5684 from influxdata/fix-connection-leak
fix: Close old connection pool after swap
2022-09-20 02:17:05 +02:00
Marko Mikulicic 758649296b fix: Close old connection pool after swap 2022-09-20 01:56:42 +02:00
Marko Mikulicic 46ab254dfb
fix: Make us log logs from the log crate again (#5680)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-09-19 23:04:28 +00:00
Marko Mikulicic 14a6b437d8
chore: Lower sqlx logging verbosity (#5681)
The default statement logging verbosity of the `sqlx` crate is INFO, which
is frankly surprising.

The reason we didn't bother with lowering this before is that the `sqlx` crate
emits logs using the `log` crate, and we're using the `tracing` crate for logging too.

We did bridge the two logging ecosystems with https://docs.rs/tracing-log/latest/tracing_log/
but until https://github.com/influxdata/influxdb_iox/pull/5680 the bridge wasn't really working
so we didn't notice the *very* verbose logs of sqlx sstatement logging (which log our whole SQL multiline statements as INFO logs...)
2022-09-19 22:56:05 +00:00
kodiakhq[bot] bbb852342b
Merge pull request #5675 from influxdata/cn/time-helpers
refactor: Add helper methods for computing times to TimeProvider
2022-09-19 20:26:42 +00:00
Carol (Nichols || Goulding) 414b0f02ca
fix: Use time helper methods in more places 2022-09-19 13:24:08 -04:00
Carol (Nichols || Goulding) c0c0349bc5
fix: Use typed Time values rather than ns 2022-09-19 12:59:20 -04:00
Carol (Nichols || Goulding) 0e23360da1
refactor: Add helper methods for computing times to TimeProvider 2022-09-19 11:34:43 -04:00
Marco Neumann 7e00426d49
refactor: concurrent table scan for "tag values" (#5671)
Ref #5668.
2022-09-19 14:11:51 +00:00
Marco Neumann 274bd80ecd
refactor: concurrent table scan for "tag keys" (#5670)
* refactor: concurrent table scan for "tag keys"

Ref #5668.

* feat: add table name to context metadata
2022-09-19 13:27:18 +00:00
Marco Neumann ef09573255
refactor: concurrent table scan in "field columns" (#5651)
* refactor: concurrent table scan in "field columns"

Similar to #5647 and #5649.

* docs: improve

Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>

Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-09-19 10:50:25 +00:00
Marco Neumann a2a864100d
chore: replace `ansi_style` with `nu-ansi-style` (#5669)
See <https://rustsec.org/advisories/RUSTSEC-2021-0139.html>.

This follows the migration that `tracing-subscriber` will perform:
https://github.com/tokio-rs/tracing/pull/2287

Note that `tracing-subscriber` is not released yet, so for the time
being we will have `ansi_style` and `nu-ansi-style` in our dependency
list. It's likely that `tracing-subscriber` will backport and and
release this change rather soon though, because people are getting
annoyed by RUSTSEC warnings.
2022-09-19 08:17:01 +00:00
dependabot[bot] 4fbb32eed6
chore(deps): Bump tokio-stream from 0.1.9 to 0.1.10 (#5667)
Bumps [tokio-stream](https://github.com/tokio-rs/tokio) from 0.1.9 to 0.1.10.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-stream-0.1.9...tokio-stream-0.1.10)

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

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-19 07:36:11 +00:00
dependabot[bot] 75b0363768
chore(deps): Bump sha2 from 0.10.5 to 0.10.6 (#5666)
Bumps [sha2](https://github.com/RustCrypto/hashes) from 0.10.5 to 0.10.6.
- [Release notes](https://github.com/RustCrypto/hashes/releases)
- [Commits](https://github.com/RustCrypto/hashes/compare/sha2-v0.10.5...sha2-v0.10.6)

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

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-19 06:57:59 +00:00
dependabot[bot] dcb22fa8d1
chore(deps): Bump syn from 1.0.99 to 1.0.100 (#5665)
Bumps [syn](https://github.com/dtolnay/syn) from 1.0.99 to 1.0.100.
- [Release notes](https://github.com/dtolnay/syn/releases)
- [Commits](https://github.com/dtolnay/syn/compare/1.0.99...1.0.100)

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

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-19 05:47:01 +00:00
dependabot[bot] db172537e8
chore(deps): Bump clap from 3.2.21 to 3.2.22 (#5664)
Bumps [clap](https://github.com/clap-rs/clap) from 3.2.21 to 3.2.22.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/v3.2.22/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/v3.2.21...v3.2.22)

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

Signed-off-by: dependabot[bot] <support@github.com>

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>
2022-09-19 05:38:39 +00:00
Stuart Carnie 5c21c66691
feat: Teach InfluxQL parser how to parse SHOW statements (#5643)
* feat: Add `SHOW DATABASES`

* feat: Add `SHOW RETENTION POLICIES`

* chore: Drive by clean up, use consistent names for functions

* feat: Parse `SHOW TAG KEYS` statement

* chore: drive-by: Ensure parsing succeeds when whitespace omitted

* feat: `SHOW TAG VALUES` statement

* feat: `SHOW FIELD KEYS` statement

* chore: Finish docs

* chore: Add additional docs to `FromMeasurementClause`

NOTE: technically, the EBNF does not match the current implementation,
but will be addressed in #5662
2022-09-19 02:02:32 +00:00
kodiakhq[bot] a5418de433
Merge pull request #5653 from influxdata/cn/share-code-with-full-compaction
feat: Re-enable full compaction to level 2, limited by the memory budget
2022-09-16 21:22:39 +00:00
kodiakhq[bot] eed31bec4e
Merge branch 'main' into cn/share-code-with-full-compaction 2022-09-16 21:15:44 +00:00
Carol (Nichols || Goulding) 20f5f205bc
fix: ChunkOrder should be either max_seq or 0, not min_time 2022-09-16 16:57:31 -04:00
Carol (Nichols || Goulding) d85e959820
fix: Sort l1 files by min_time rather than max_sequence_number 2022-09-16 16:15:18 -04:00
Carol (Nichols || Goulding) 50ddd588b1
test: Add a case of L1+L2 files being compacted into L2 2022-09-16 16:15:18 -04:00
Carol (Nichols || Goulding) a8d817c91a
test: Explain expected value 2022-09-16 16:15:18 -04:00
Carol (Nichols || Goulding) 1ab250dfac
fix: Sort chunks taking into account what level compaction is targetting 2022-09-16 16:15:18 -04:00
Carol (Nichols || Goulding) ca4c5d65e7
docs: Clarify comments on sort order of input/output of filtering 2022-09-16 16:15:17 -04:00
Nga Tran 346ef1c811
chore: reduce number of histogram buckets (#5661) 2022-09-16 19:44:22 +00:00
Dom d53b4261cb
Merge pull request #5660 from influxdata/dom/redundant-params
refactor(ingester): remove redundant fn args
2022-09-16 17:54:51 +01:00
Dom Dwyer b0eb85ddd5 refactor: store ShardId in child nodes
Instead of passing the ShardId into each function for child nodes of the
Shard, store it. This avoids the possibility of mistakenly passing the
wrong value.
2022-09-16 18:00:11 +02:00
Dom Dwyer 07b08fa9cb refactor: add table name in PartitionData
A partition belongs to a table - this commit stores the table name in
the PartitionData (which was readily available at construction time)
instead of redundantly passing it into various functions at the risk of
getting it wrong.
2022-09-16 17:59:22 +02:00
Dom Dwyer c7ba0bea91 refactor: ShardId & TableId in PartitionData
When we construct a PartitionData we have the ShardId and TableId. This
commit stores them in the PartitionData for later use, rather than
repeatedly passing them in again when constructing snapshots, at the
risk of passing the wrong IDs.
2022-09-16 17:17:16 +02:00
Dom Dwyer 85d6efafe1 refactor: snapshot_to_persisting redundant ID
Partition::snapshot_to_persisting() passes the ID of the partition it is
calling `snapshot_to_persisting()` on. The partition already knows what
its ID is, so at best it's redundant, and at worst, inconsistent with
the actual ID.
2022-09-16 17:08:08 +02:00
dependabot[bot] 099dda430e
chore(deps): Bump digest from 0.10.3 to 0.10.5 (#5655)
Bumps [digest](https://github.com/RustCrypto/traits) from 0.10.3 to 0.10.5.
- [Release notes](https://github.com/RustCrypto/traits/releases)
- [Commits](https://github.com/RustCrypto/traits/compare/digest-v0.10.3...digest-v0.10.5)

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

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Dom <dom@itsallbroken.com>
2022-09-16 14:03:54 +00:00
kodiakhq[bot] 2c9f9ec52b
Merge pull request #5657 from influxdata/dom/per-partition-read-offset
perf: O(1) partition persist mark discovery
2022-09-16 12:13:31 +00:00
Dom Dwyer ce0d189260 perf: O(1) partition persist mark discovery
Changes the ingest code path to eliminate scanning the parquet_files
table to discover the last persisted offset per partition, instead
utilising the new persisted_sequence_number field on the Partition
itself to read the same value.

This lookup blocks ingest for the shard, so removing the expensive query
from the ingest hot path should improve catch-up time after a
restart/deployment.
2022-09-16 14:06:42 +02:00
Carol (Nichols || Goulding) cde0a94fd5
fix: Re-enable full compaction to level 2
This will work the same way that compacting level 0 -> level 1 does
except that the resulting files won't be split into potentially multiple
files. It will be limited by the memory budget bytes, which should limit
the groups more than the max_file_size_bytes would.
2022-09-15 14:53:12 -04:00
Carol (Nichols || Goulding) e05657e8a4
feat: Make filter_parquet_files more general with regards to compaction level 2022-09-15 14:53:08 -04:00
Carol (Nichols || Goulding) 9b99af08e4
fix: Level 1 files need to be sorted by max sequence number for full compaction 2022-09-15 14:53:07 -04:00
Carol (Nichols || Goulding) dc64e494bd
docs: Update comment to what we'd like this code to do 2022-09-15 14:53:07 -04:00
kodiakhq[bot] 69c9e7b5ff
Merge pull request #5650 from influxdata/cn/partition-estimates-size
refactor: Clear up responsibilities of different parts of the compactor
2022-09-15 18:50:50 +00:00
kodiakhq[bot] 1c0b6997c1
Merge branch 'main' into cn/partition-estimates-size 2022-09-15 18:43:36 +00:00
Carol (Nichols || Goulding) f5497a3a3d
refactor: Extract a conversion for convenience in tests 2022-09-15 12:48:36 -04:00