Commit Graph

8883 Commits (fc162b9dc2ada841d75626d4716b1dd75c07afcd)

Author SHA1 Message Date
dependabot[bot] fc162b9dc2
chore(deps): Bump clap from 3.2.17 to 3.2.19 (#5514)
Bumps [clap](https://github.com/clap-rs/clap) from 3.2.17 to 3.2.19.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/v3.2.19/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/v3.2.17...v3.2.19)

---
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-01 11:03:52 +00:00
Marko Mikulicic 15369d4c52
feat: Implement gRPC binary logger (#5473)
* feat: Implement gRPC binary logger

* chore: Run cargo hakari tasks

* fix: Apply suggestions from code review

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

Co-authored-by: CircleCI[bot] <circleci@influxdata.com>
Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-09-01 10:57:02 +00:00
dependabot[bot] e7d75a5513
chore(deps): Bump futures-sink from 0.3.23 to 0.3.24 (#5495)
Bumps [futures-sink](https://github.com/rust-lang/futures-rs) from 0.3.23 to 0.3.24.
- [Release notes](https://github.com/rust-lang/futures-rs/releases)
- [Changelog](https://github.com/rust-lang/futures-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/futures-rs/compare/0.3.23...0.3.24)

---
updated-dependencies:
- dependency-name: futures-sink
  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>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-09-01 10:49:38 +00:00
dependabot[bot] 06825d5592
chore(deps): Bump sha2 from 0.10.2 to 0.10.3 (#5513)
Bumps [sha2](https://github.com/RustCrypto/hashes) from 0.10.2 to 0.10.3.
- [Release notes](https://github.com/RustCrypto/hashes/releases)
- [Commits](https://github.com/RustCrypto/hashes/compare/sha2-v0.10.2...sha2-v0.10.3)

---
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>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-09-01 10:42:06 +00:00
dependabot[bot] c4d203de5c
chore(deps): Bump md-5 from 0.10.1 to 0.10.2 (#5515)
Bumps [md-5](https://github.com/RustCrypto/hashes) from 0.10.1 to 0.10.2.
- [Release notes](https://github.com/RustCrypto/hashes/releases)
- [Commits](https://github.com/RustCrypto/hashes/compare/md2-v0.10.1...md-5-v0.10.2)

---
updated-dependencies:
- dependency-name: md-5
  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-01 10:35:07 +00:00
dependabot[bot] 9ba9128887
chore(deps): Bump httparse from 1.7.1 to 1.8.0 (#5516)
Bumps [httparse](https://github.com/seanmonstar/httparse) from 1.7.1 to 1.8.0.
- [Release notes](https://github.com/seanmonstar/httparse/releases)
- [Commits](https://github.com/seanmonstar/httparse/compare/v1.7.1...v1.8.0)

---
updated-dependencies:
- dependency-name: httparse
  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>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-09-01 10:27:36 +00:00
dependabot[bot] 9af93ca9ba
chore(deps): Bump pretty_assertions from 1.2.1 to 1.3.0 (#5517)
Bumps [pretty_assertions](https://github.com/rust-pretty-assertions/rust-pretty-assertions) from 1.2.1 to 1.3.0.
- [Release notes](https://github.com/rust-pretty-assertions/rust-pretty-assertions/releases)
- [Changelog](https://github.com/rust-pretty-assertions/rust-pretty-assertions/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rust-pretty-assertions/rust-pretty-assertions/compare/v1.2.1...v1.3.0)

---
updated-dependencies:
- dependency-name: pretty_assertions
  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>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-09-01 10:20:26 +00:00
dependabot[bot] 00ed79ff1b
chore(deps): Bump thiserror from 1.0.32 to 1.0.33 (#5524)
Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.32 to 1.0.33.
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.32...1.0.33)

---
updated-dependencies:
- dependency-name: thiserror
  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-01 09:11:31 +00:00
Marco Neumann c59dd01742
refactor: use concrete inner type in `CacheWithMetrics` (#5522)
The API user still CAN use dynamic dispatch but doesn't have to. This
also simplifies the generics a bit.

This is similar to #5520.

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-09-01 06:05:59 +00:00
Stuart Carnie 1fb9423f98
feat: Teach IOx how to parse InfluxQL literals (#5460)
* feat: Parse various InfluxQL literals

* feat: Parse regex, refactor single and double quoted string parsing

* chore: Literals do not include sign; those are unary expressions

* chore: Add docs

* chore: Integer literals are unsigned

Add more tests for max values

* chore: Impl Display for Literal; add macro to write escaped strings

Also added Duration type for InfluxQL durations, so they can be properly
formatted when displayed.

The macro uses match to efficiently map a small number of characters
to their escaped equivalent. It also removes a bit of boilerplate.

* chore: Don't tie lifetime of AST elements to source `str`

* feat: Impl From trait for Literal, Regex and Duration

* chore: Derive Copy for Duration

* chore: PR Feedback, use unwrap_err for better output when API fails

* chore: Drive-by cleanup using unwrap_err
2022-08-31 23:44:58 +00:00
kodiakhq[bot] 26dfccf26e
Merge pull request #5523 from influxdata/cn/more-compactor-tests
refactor: Use more iox test utils in compactor tests
2022-08-31 19:10:24 +00:00
Carol (Nichols || Goulding) 62b8819d49
fix: Carry object store ID through test builder, but pick new every time 2022-08-31 14:58:46 -04:00
Carol (Nichols || Goulding) b0e871196c
test: Use more iox test utils in this compactor test 2022-08-31 14:37:59 -04:00
Carol (Nichols || Goulding) a9d664d0bf
feat: Add a way to set the row count on Parquet file catalog entries
And only allow setting this when no record batch or line protocol is
specified so that there isn't a way to create a parquet file with data
that has a mismatched row count.
2022-08-31 14:36:42 -04:00
Carol (Nichols || Goulding) c21ac9050b
refactor: Extract a test util fn that will only create parquet file catalog records 2022-08-31 14:00:00 -04:00
Nga Tran a32d5180b3
fix: loop forever in compact_hot_partition_candidates (#5518)
* fix: loop forever in compact_hot_partition_candidates

* chore: cleanup

* fix: avoid using continues that will cause bugs in corner cases

* fix: Pass compaction fn as a closure instead to allow collection of groups in test

* fix: Add Send bound as suggested by clippy

* fix: fix the test to return data of round 3 instead of round 2

Co-authored-by: Carol (Nichols || Goulding) <carol.nichols@gmail.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-08-31 17:46:59 +00:00
YIXIAO SHI 22c3de3cbc
feat: router write line protocol duration (#5507)
* feat: router write line protocol duration

* feat: `http_write_lines_duration` metric add attributes.

* chore: cargo fmt -all

* chore: rename metric name and delete metric label

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-08-31 16:19:18 +00:00
Marco Neumann c0dda14cef
refactor: use concrete backend type in `CacheDriver` (#5520)
This removes some `Box<dyn ...>` indirection when the user doesn't want
it (you still can, but don't have to) and makes the whole type handling
easier to understand.

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-08-31 14:58:25 +00:00
Dom b8ef1693a3
Merge pull request #5521 from influxdata/dom/ingester-row-limit
feat(ingester): restrict partition row count
2022-08-31 15:03:39 +01:00
Dom ed2490deb2
Merge branch 'main' into dom/ingester-row-limit 2022-08-31 14:56:42 +01:00
Dom Dwyer 2a19606456 feat(ingester): restrict partition row count
This limit restricts a single partition to containing at most N rows
before it is marked for persistence (note: being marked for persistence
does not currently prevent further ingest for that partition.)
2022-08-31 15:48:18 +02:00
Andrew Lamb 6669d85fb4
chore: Update datafusion + arrow/parquet to `21.0.0` (#5519)
* chore: Update arrow/arrow-flight/parquet to 21.0.0

* chore: Update datafusion pin

* chore: Fix arrow update script

* chore: Update Cargo.lock

* chore: Update for new API
2022-08-31 13:30:47 +00:00
Nga Tran cb10a7c6d8
feat: More accurate memory estimate for compaction (#5471)
* feat: initial implementation of memory estimation for a compaction

* feat: estimate size of files and have the right actions for the needed budget

* feat: run candidates in parallel

* fix: have the right name for the column field of the output struct

* feat: add metrics for estimated budgets

* chore: cleanup

* chore: Apply suggestions from code review

Co-authored-by: Carol (Nichols || Goulding) <193874+carols10cents@users.noreply.github.com>

* fix: fix syntax after applying review's suggestions

* refactor: Convert a Vec to VecDeque to go well with pop and push

* chore: remove max_concurrent_size_bytes and input_size_threshold_bytes

* chore: remove input_file_count_threshold

* test: tests for estimate_arrow_bytes_for_file

Co-authored-by: Carol (Nichols || Goulding) <193874+carols10cents@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-08-30 13:44:44 +00:00
Dom 887d73f7e1
Merge pull request #5510 from influxdata/dom/empty-parquet
fix: remove empty parquet panic
2022-08-30 14:20:20 +01:00
Dom Dwyer 2fc0ddbea1 fix: compactor tolerates empty output
Changes the compactor code to tolerate a SplitExec yielding an empty
partition (with no rows).

This raises a WARN as the situation in which this is acceptable is very
rare, and is more likely indicative of an opportunity to improve the
SplitExec usage (i.e. pruning out unnecessary split points).
2022-08-30 14:52:31 +02:00
Dom Dwyer 7698264768 refactor: raise error for no rows in parquet file
Previously when attempting to serialise a stream of one or more
RecordBatch containing no rows (resulting in an empty file), the parquet
serialisation code would panic.

This changes the code path to raise an error instead, to support the
compactor making multiple splits at once, which may overlap a single
chunk:

                  ────────────── Time ────────────▶

                          │                │
                  ┌█████──────────────────────█████┐
                  │█████  │    Chunk 1     │  █████│
                  └█████──────────────────────█████┘
                          │                │

                          │                │

                      Split T1         Split T2

In the example above, the chunk has an unusual distribution of write
timestamps over the time range it covers, with all data having a
timestamp before T1, or after T2. When a running a SplitExec to slice
this chunk at T1 and T2, the middle of the resulting 3 subsets will
contain no rows. Because we store only the min/max timestamps in the
chunk statistics, it is unfortunately impossible to prune one of these
split points from the plan ahead of time.
2022-08-30 14:52:31 +02:00
Raphael Taylor-Davies 711ba77341
chore: update object_store to test IMDSv1 fallback (#5509)
* chore: update object_store to test IMDSv1 fallback

* chore: Run cargo hakari tasks

Co-authored-by: CircleCI[bot] <circleci@influxdata.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-08-30 12:31:49 +00:00
Marco Neumann fecbbd9fa1
refactor: improve namespace caching in querier (#5492)
1. Cache converted schema instead of catalog schema. This safes a buch
   of memcopies during conversion.
2. Simplify creation of new chunks, we now only need a `CachedTable`
   instead of a namespace and a table schema.

In an artificial benchmark, this removed around 10ms from the query
(although that was prior to #5467 which moved schema conversion one
level up). Still I think it is the cleaner cache design.

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-08-30 11:42:21 +00:00
Marco Neumann 430536f05f
refactor: use a single timestamp in policy backend (#5508)
* refactor: use a single timestamp in policy backend

Prior to this PR we had at least 1 `TimeProvider::now` calls per GET
request (for caches that only used LRU) and up to 3 calls (caches with
LRU + refresh + TTL). Let's instead use a single timestamp that is
created by the policy backend itself (instead of the policies). This has
the following consequences:

- **efficiency:** `SystemProvider::now` is not free, even though under Linux
  this doesn't result in a syscall, it uses the stdlib time system which
  also checks for monotonicity
- **consistency:** All changes for a single trigger (e.g. a
  GET cache call) now use a single timestamp instead of slightly
  increasing ones. I argue this is the better semantic, simpler to
  understand and better to debug.

For some (slightly artificial) local performance experiment, this shaves
off around 2ms per single-table SQL query. However I expect that there might
be more degenerated cases (e.g. multi-table SQL queries or some
InfluxRPC requests that hit multiple tables).

The majority of this patch is moving the `TimeProvider` from the
policies into the policy backend.

* docs: explain `now` parameter
2022-08-30 11:23:25 +00:00
kodiakhq[bot] bf0a0ab3a5
Merge pull request #5505 from influxdata/dom/revert-object-store-bump
revert: object store bump
2022-08-30 08:56:10 +00:00
Dom 89af2f2b1d
Merge branch 'main' into dom/revert-object-store-bump 2022-08-30 09:47:02 +01:00
Dom 91167428f2
Merge pull request #5504 from influxdata/dom/dotenvy
build: bump dotenvy
2022-08-30 09:46:00 +01:00
Dom Dwyer 66f0b59dbb revert: remove Azure SDK / bump object_store
This reverts commit c2f8efa03a.
2022-08-30 10:41:29 +02:00
Dom Dwyer e752a707f8 revert: remove audit ignore for RUSTSEC-2022-0048
This reverts commit 227149e5b6.
2022-08-30 10:39:55 +02:00
Dom Dwyer dcc0f9d34f build: bump dotenvy
I fixed this while waiting for my build to deploy. I think that says
more about our build than anything else!
2022-08-30 10:34:26 +02:00
Dom 5530d02adb
Merge pull request #5500 from influxdata/dependabot/cargo/futures-0.3.24
chore(deps): Bump futures from 0.3.23 to 0.3.24
2022-08-30 09:20:20 +01:00
Dom 747f5440e1
Merge pull request #5496 from influxdata/dependabot/cargo/futures-channel-0.3.24
chore(deps): Bump futures-channel from 0.3.23 to 0.3.24
2022-08-30 09:20:12 +01:00
Dom b3a7602b47
Merge pull request #5503 from influxdata/dependabot/cargo/futures-core-0.3.24
chore(deps): Bump futures-core from 0.3.23 to 0.3.24
2022-08-30 09:19:07 +01:00
dependabot[bot] 852f6c5749
chore(deps): Bump futures-core from 0.3.23 to 0.3.24
Bumps [futures-core](https://github.com/rust-lang/futures-rs) from 0.3.23 to 0.3.24.
- [Release notes](https://github.com/rust-lang/futures-rs/releases)
- [Changelog](https://github.com/rust-lang/futures-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/futures-rs/compare/0.3.23...0.3.24)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-30 01:25:21 +00:00
dependabot[bot] 0137db9adc
chore(deps): Bump futures from 0.3.23 to 0.3.24
Bumps [futures](https://github.com/rust-lang/futures-rs) from 0.3.23 to 0.3.24.
- [Release notes](https://github.com/rust-lang/futures-rs/releases)
- [Changelog](https://github.com/rust-lang/futures-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/futures-rs/compare/0.3.23...0.3.24)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-30 01:24:21 +00:00
dependabot[bot] 480bcbda18
chore(deps): Bump futures-channel from 0.3.23 to 0.3.24
Bumps [futures-channel](https://github.com/rust-lang/futures-rs) from 0.3.23 to 0.3.24.
- [Release notes](https://github.com/rust-lang/futures-rs/releases)
- [Changelog](https://github.com/rust-lang/futures-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/futures-rs/compare/0.3.23...0.3.24)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-30 01:23:16 +00:00
kodiakhq[bot] 00aa4b9c83
Merge pull request #5470 from influxdata/cn/kafka-topic
feat: Renaming kafka topic types
2022-08-29 20:53:04 +00:00
kodiakhq[bot] 419efb91e9
Merge branch 'main' into cn/kafka-topic 2022-08-29 20:46:33 +00:00
Andrew Lamb de47f5605b
chore: Update datafusion (with new sqlparser release) - option 1 (#5433)
* chore: Update datafusion pin

* chore: Update now that user is a reserved word

* chore: Update cargo.lock

* fix: update query for user function

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-08-29 19:10:00 +00:00
Carol (Nichols || Goulding) dbd27f648f
refactor: Rename more mentions of Kafka to their other name where appropriate 2022-08-29 14:27:02 -04:00
Carol (Nichols || Goulding) 1b49ad25f7
refactor: Rename KafkaTopicId to TopicId 2022-08-29 14:27:02 -04:00
Carol (Nichols || Goulding) 58f0b63cdc
refactor: Rename KafkaTopic to Topic or TopicMetadata or topic name as appropriate 2022-08-29 14:27:02 -04:00
kodiakhq[bot] 122dbe1b4b
Merge pull request #5435 from influxdata/cn+jpg/shard
feat: renaming some of the confusing sequencer things
2022-08-29 18:16:15 +00:00
Carol (Nichols || Goulding) cb52683a1a
fix: Redo uses after rebase 2022-08-29 14:08:33 -04:00
Carol (Nichols || Goulding) 3aa3ae2ba5
docs: Add more comments about why to use ShardIndex or ShardId 2022-08-29 14:07:20 -04:00