Commit Graph

12633 Commits (3c0388fdea805a6794a52b1a1844ae712fb06bf3)

Author SHA1 Message Date
Dom Dwyer 3c0388fdea
revert: "Merge pull request #7953 from influxdata/dom/partition-key-dedupe"
This reverts commit 5bce4477b7, reversing
changes made to 64fa17b3be.
2023-06-14 16:07:14 +02:00
Marco Neumann 335d9f7357
chore: minimize proptest features (#7993) 2023-06-14 12:28:18 +00:00
Marco Neumann 1762172321
refactor: remove `procspawn` (#7990)
`procspawn` indirectly pulls in many outdated dependencies. It was
introduced in #7850 to work around a flaky test. Isolating the test into
its own binary has the same affect and requires less dependencies.
2023-06-14 11:09:37 +00:00
Marco Neumann c4d475cb86
chore: prune mockito dependencies (#7991)
We don't really need the color feature. Removing it has several
benifits:

- less dependencies
- one less MPL license
- no `atty` (only used by tests but has a security bug)
2023-06-14 10:33:30 +00:00
Marco Neumann 8cd82728cd
fix: deploy_release after debian upgrade (#7988) 2023-06-14 09:16:15 +00:00
dependabot[bot] 98a2e852db
chore(deps): Bump uuid from 1.3.3 to 1.3.4 (#7985)
Bumps [uuid](https://github.com/uuid-rs/uuid) from 1.3.3 to 1.3.4.
- [Release notes](https://github.com/uuid-rs/uuid/releases)
- [Commits](https://github.com/uuid-rs/uuid/compare/1.3.3...1.3.4)

---
updated-dependencies:
- dependency-name: uuid
  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-06-14 07:58:52 +00:00
wiedld 5dd9b50dd7
chore(7618): add metric to frame encoding instrumentation (#7901)
* add FlightService metric to record a duration histogram across requests.
* duration per partition, per request
* make available to the FlightFrameEncodeRecorder
* update naming conventions to reflect updated functionality
2023-06-13 11:29:29 -07:00
kodiakhq[bot] af92463848
Merge pull request #7979 from influxdata/savage/replace-dml-operation-for-ingester-rpc-write
refactor(ingester): Add `data_types` module with `IngestOp` enumeration
2023-06-13 13:35:00 +00:00
kodiakhq[bot] 12d5b5e529
Merge branch 'main' into savage/replace-dml-operation-for-ingester-rpc-write 2023-06-13 13:29:39 +00:00
Marco Neumann 1e1488aad0
feat: selector last/min/max w/ other values (#7977)
* fix: size calculation for `selector_first`

* test: extract common error tests

* feat: additional args for `selector_last`

* refactor: de-dup code

* fix: break tie for first/last selector

* feat: additional args for `selector_min`

* feat: additional args for `selector_max`

* fix: use same tie-breaker

* refactor: de-dup code

* refactor: simplify code

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-06-13 13:29:21 +00:00
Fraser Savage 4909d4122f
refactor(ingester): Rename `data_types` module to `dml_payload` 2023-06-13 14:23:37 +01:00
Dom 7fef809b2a
Merge pull request #7961 from influxdata/dom/partition-key-truncate
feat: bound partition key size
2023-06-13 14:08:45 +01:00
Dom 3b7c2bc3e5
Merge branch 'main' into dom/partition-key-truncate 2023-06-13 14:02:14 +01:00
Fraser Savage e5719cffff
refactor(ingester): Add `data_types` module with `IngestOp` enumeration
The `dml` crate and its contained types simultaneously contain more and
less data than the ingester needs for writes. This type is to replace
the use of `DmlOperation` and `DmlWrite` within the ingester's internals
so that the type can be specialised with low blast-radius changes.

The key change here is to remove the ties to the `DmlMeta` construction
and allow sequencing of data on a per-partition basis
2023-06-13 11:54:51 +01:00
Marco Neumann fad11b524f
chore: fix JDK for integration tests (#7980)
Broken after the first nightly CI image was generated after #7972.

Move JDK installation to image generation and fix version.
2023-06-13 10:51:26 +00:00
Dom a003c2d6cd
Merge pull request #7978 from influxdata/dependabot/cargo/crossbeam-utils-0.8.16
chore(deps): Bump crossbeam-utils from 0.8.15 to 0.8.16
2023-06-13 09:40:22 +01:00
dependabot[bot] 2ffa9f3cda
chore(deps): Bump crossbeam-utils from 0.8.15 to 0.8.16
Bumps [crossbeam-utils](https://github.com/crossbeam-rs/crossbeam) from 0.8.15 to 0.8.16.
- [Release notes](https://github.com/crossbeam-rs/crossbeam/releases)
- [Changelog](https://github.com/crossbeam-rs/crossbeam/blob/master/CHANGELOG.md)
- [Commits](https://github.com/crossbeam-rs/crossbeam/compare/crossbeam-utils-0.8.15...crossbeam-utils-0.8.16)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-13 02:00:14 +00:00
Joe-Blount 614ff35998
Merge pull request #7958 from influxdata/jrb_46_compactor_scratchpad_cleaning
fix: clean compaction output from scratchpad
2023-06-12 12:05:42 -05:00
Joe-Blount 45099fa526
Merge branch 'main' into jrb_46_compactor_scratchpad_cleaning 2023-06-12 12:00:06 -05:00
Carol (Nichols || Goulding) 5761226728
fix: Use the parts method to get the template length
The template length should always return a value > 0 because templates
must have at least one part. Before this change, `len` would have
returned 0 if there was no override because of the `unwrap_or_default`.
Instead, use the `parts` method, which takes care of the fallback to the
hardcoded default template, whose len will always be 1.
2023-06-12 12:21:14 -04:00
Carol (Nichols || Goulding) eef84d9df3
test: Use zip rather than indexing (also check that lengths match) 2023-06-12 12:21:05 -04:00
Carol (Nichols || Goulding) 7a99737f16
fix: Only allocate to remove the truncation marker if we need to 2023-06-12 12:05:16 -04:00
Carol (Nichols || Goulding) eb01d93d7f
fix: Clarify unit of value in a panic message 2023-06-12 12:02:56 -04:00
Carol (Nichols || Goulding) 0fd32706a3
fix: Improve test assertion failure messages 2023-06-12 12:01:15 -04:00
Carol (Nichols || Goulding) 5decbae0d5
docs: Clarify some partition template docs 2023-06-12 11:56:24 -04:00
kodiakhq[bot] f58e647d3c
Merge pull request #7962 from influxdata/savage/inspect-wal-contents
feat(cli): Add `influxdb_iox debug wal inspect` command
2023-06-12 14:27:41 +00:00
kodiakhq[bot] c2c614c765
Merge branch 'main' into savage/inspect-wal-contents 2023-06-12 14:22:05 +00:00
Fraser Savage 51f45fd710
refactor(cli): Simplify and improve sequence range prop test
Co-authored-by: Dom <dom@itsallbroken.com>
2023-06-12 15:14:08 +01:00
Marco Neumann 453a361d3c
feat: catalog parquet file cache TTL (#7975)
Avoid that the querier accesses files that were flagged for deletion a
long time ago. This would happen if the following conditions hold:

- we have very long-running querier pods (e.g. over holidays)
- the table doesn't receive any writes (or the partition if we ever
  change the cache granularity), hence the querier is never informed
  that its state is out-of-date
- a compactor runs a cold compaction, and by doing so flags a file for
  deletion
- the GC finally wants to delete it

This is mostly a safety measure to prevent weird internal server errors
that should nearly never happen. On the other hand I do not want to hunt
Heisenbugs.
2023-06-12 14:02:47 +00:00
dependabot[bot] 792b991778
chore(deps): Bump rustix from 0.37.19 to 0.37.20 (#7969)
Bumps [rustix](https://github.com/bytecodealliance/rustix) from 0.37.19 to 0.37.20.
- [Release notes](https://github.com/bytecodealliance/rustix/releases)
- [Commits](https://github.com/bytecodealliance/rustix/compare/v0.37.19...v0.37.20)

---
updated-dependencies:
- dependency-name: rustix
  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-06-12 11:37:11 +00:00
Fraser Savage 71e47b59ab
refactor(wal): Make more use of combinators for WAL segment reading logic 2023-06-12 12:27:20 +01:00
Marco Neumann bfc3c0d934
chore: update CI and prod image to Debian 12 / bookworm (#7972)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-06-12 09:33:23 +00:00
dependabot[bot] 41386078fe
chore(deps): Bump chrono from 0.4.24 to 0.4.26 (#7971)
* chore(deps): Bump chrono from 0.4.24 to 0.4.26

Bumps [chrono](https://github.com/chronotope/chrono) from 0.4.24 to 0.4.26.
- [Release notes](https://github.com/chronotope/chrono/releases)
- [Changelog](https://github.com/chronotope/chrono/blob/main/CHANGELOG.md)
- [Commits](https://github.com/chronotope/chrono/compare/v0.4.24...v0.4.26)

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

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

* chore: Run cargo hakari tasks

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: CircleCI[bot] <circleci@influxdata.com>
Co-authored-by: Dom <dom@itsallbroken.com>
2023-06-12 09:12:50 +00:00
Fraser Savage e809aadfe5
chore(cli): Fix error typo in `wal inspect` test
Co-authored-by: Andrew Lamb <alamb@influxdata.com>
2023-06-12 10:12:18 +01:00
dependabot[bot] 5db690f214
chore(deps): Bump clap from 4.3.2 to 4.3.3 (#7968)
Bumps [clap](https://github.com/clap-rs/clap) from 4.3.2 to 4.3.3.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/v4.3.2...v4.3.3)

---
updated-dependencies:
- dependency-name: clap
  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-06-12 08:57:03 +00:00
dependabot[bot] 19b0fbc81c
chore(deps): Bump log from 0.4.18 to 0.4.19 (#7966)
Bumps [log](https://github.com/rust-lang/log) from 0.4.18 to 0.4.19.
- [Release notes](https://github.com/rust-lang/log/releases)
- [Changelog](https://github.com/rust-lang/log/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/log/compare/0.4.18...0.4.19)

---
updated-dependencies:
- dependency-name: log
  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-06-12 08:38:44 +00:00
Joe-Blount 59fd5cd7b4 chore: retain written files in shadow mode 2023-06-09 13:22:49 -05:00
Fraser Savage 73c0c28bd0
feat(cli): Add `influxdb_iox debug wal inspect` command
This commit adds an `inspect` command to read through the sequenced
operations in a WAL file and debug pretty print their contents to
stdout, optionally filtering by a sequence number range.
2023-06-09 18:16:57 +01:00
Fraser Savage fa69994358
refactor(wal): Implement `Iterator` for ClosedSegmentFileReader
The ClosedSegmentFileReader is pretty much an iterator anyways, this
just enables using all the juicy combinators with it more easily.
2023-06-09 17:30:53 +01:00
Martin Hilton c8a7a8ec91
fix(service_grpc_flight): invalid token status code (#7960)
Historically the authz crate didn't distinguish between an invalid
token and a valid token without the required permissions. Recently
errors were added to distinguish these cases. This means that an
invalid token now returns an "Internal" error if supplied an invalid
token. Detect this case and return a "Permission Denied" error,
which is the error type that was previously returned in this case.

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-06-09 12:09:51 +00:00
Dom Dwyer fc49b3ec19
feat: restrict partition template length
Partition templates should not contain more than 8 parts, which when
combined with a per-part byte limit, bounds the maximum size of a
partition key.

This commit causes the router to refuse to service a write request that
contains > 8 parts in the template - this causes a panic, as it's a
broken system invariant and should be an unreachable state. Templates
are pre-validated at creation time to contain no more than 8 parts, and
are immutable:

    https://github.com/influxdata/influxdb_iox/pull/7930
2023-06-09 13:44:33 +02:00
Dom Dwyer 39c22a2c29
refactor: expose partition part count
Allow a table template override to report the number of template parts
within it.

This ignores the lint wanting an "is_empty()" method too, because it's
misleading and redundant - a template MUST never be empty.
2023-06-09 13:44:32 +02:00
Dom Dwyer 050093df1e
feat: truncate partition key parts at 200 bytes
This commit ensures all partition key parts are less than or equal to
200 bytes long.

If a string exceeds the 200 byte limit, it is truncated (avoiding
splitting unicode code-points or graphemes) and then a single "#"
sentinel value is appended. When reversed from the string, these column
values are indicated to be suitable for prefix-matching only - a
property that is encoded into the type system.

This commit takes a conservative approach of not splitting graphemes as
outlined in the module documentation, but this could be relaxed in the
future if needed.
2023-06-09 13:44:32 +02:00
Carol (Nichols || Goulding) 566ec68c58
refactor: Extract a test helper method for creating ParquetFileParams (#7959)
Co-authored-by: Dom <dom@itsallbroken.com>
2023-06-09 09:44:30 +00:00
Carol (Nichols || Goulding) 9524e7e478
docs: Remove TODO comment that's TODONE (#7956)
* docs: Remove TODO comment that's TODONE

* docs: Oops, turns out the TODO comment was this enum's documentation

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-06-08 19:22:22 +00:00
Andrew Lamb fd8855fc98
chore: use upstream FlightSQL metadata implementation (#7949)
* chore: use upstream FlightSQL metadata implementation

* fix: update doc strings

* fix: Remove incorrect comment about table_type
2023-06-08 18:39:11 +00:00
Dom 5bce4477b7
Merge pull request #7953 from influxdata/dom/partition-key-dedupe
perf: partition key generation dedupe
2023-06-08 16:34:41 +01:00
Dom 93fe5949e9
Merge branch 'main' into dom/partition-key-dedupe 2023-06-08 16:12:31 +01:00
Joe-Blount 9171e1521f fix: clean compaction output from scratchpad 2023-06-08 09:35:33 -05:00
kodiakhq[bot] 64fa17b3be
Merge pull request #7937 from influxdata/savage/sequence-per-partition
refactor(wal): Associate sequence numbers to table ID in `SequencedWalOp`s
2023-06-08 14:34:16 +00:00