Commit Graph

49187 Commits (3c9e6ed836fcd607af90589e438cb35ca83efeb6)

Author SHA1 Message Date
Michael Angerman d87c2ae821
chore: change loglevel to info on No compaction job found (#8684) 2023-09-06 14:49:47 -07:00
Joe-Blount 98960a353c
fix(compactor): prevent sort order mismatches from creating overlapping chains (#8675)
* fix(compactor): prevent sort order mismatches from creating overlapping regions

* chore: test additions for incorrectly created regions

* fix(compactor): more sort order mismatch fixes

* chore: insta updates

* chore: insta updates after merge
2023-09-06 14:53:09 +00:00
Carol (Nichols || Goulding) fdffa871c3
feat: Optionally specify a table name to get just its schema (#8650)
Rather than always having to request all of a namespace's schema then
filtering to the one you want. Will make this more consistent with
upserting schema by namespace+table.

Fixes #4997.

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-09-06 13:33:25 +00:00
Nga Tran de6f710c31
chore: reland have ingester's SortKeyState include sort_key_ids (#8678) 2023-09-06 12:01:07 +00:00
Fraser Savage d05380db09
test(ingester): Cover more WAL reader errors using wal replay test macro 2023-09-06 12:01:16 +01:00
Fraser Savage 36604d30ae
refactor(ingester): Only automatically recover when encountering `IncompleteEntry` during wal replay 2023-09-06 12:01:15 +01:00
Dom 27a106ba8b
Merge pull request #8670 from influxdata/dom/gossip
feat(compactor): gossip compaction completion events
2023-09-06 11:30:16 +01:00
Dom b5a9a6c141
Merge branch 'main' into dom/gossip 2023-09-06 11:24:56 +01:00
Fraser Savage 73533a71fa
refactor(wal): Disambiguate between `UnexpectedEof` and other errors during entry read 2023-09-06 11:10:08 +01:00
Martin Hilton 6056571e74
fix(influxql): FILL(linear) for selectors (#8396)
* fix(influxql): FILL(linear) for selectors

Ensure that selector functions such as FIRST, LAST, MIN and MAX can
use LINEAR filling in the same way as influxdb 1.8.

* chore: review suggestions

Apply suggestions from the review. This adds more tests and support
for interpolation in SQL.

* fix: lint

* fix: lint

* chore: buffered input for struct arrays

Ensure that for linear interpolation the buffered input of a struct
field ensures that buffering only stops when there is a non-null
struct containing a non-null value.

* fix: integration test

* fix(iox_query): make clippy happy

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-09-06 09:44:28 +00:00
dependabot[bot] 4f6864c0b9
chore(deps): Bump chrono from 0.4.28 to 0.4.29 (#8677)
* chore(deps): Bump chrono from 0.4.28 to 0.4.29

Bumps [chrono](https://github.com/chronotope/chrono) from 0.4.28 to 0.4.29.
- [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.28...v0.4.29)

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

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

* fix: deprecations

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Marco Neumann <marco@crepererum.net>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-09-06 09:20:58 +00:00
Marco Neumann 720bdc22c8
feat: add "deserialize" layer for i->q V2 client (#8639)
Adds the code that deserializes the gRPC response into proper high level
types. Uses mostly the low level code added in #8347.

For #8349.
2023-09-06 09:15:23 +00:00
Marco Neumann 377d2a8215
feat: network layer for i->q V2 client (#8640)
Adds the actual network IO layer for #8349.

This is a rather simple layer for now, but we may want to tune some
connection settings in the future.
2023-09-06 09:07:17 +00:00
Marco Neumann 4d49be9777
feat: add "serialize" layer for i->q V2 client (#8638)
The layer that serializes our requests. This also contains the logic to
leave out non-serialiable filters like the V1 version (same tests, just
slightly differently arranged).

For #8349.
2023-09-06 08:36:33 +00:00
Marco Neumann 260aa0d64c
feat: "logging" layer for i->q V2 client (#8641)
* feat: more `TestResponse` constructors

* feat: "logging" layer for i->q V2 client

Logging layer for #8349. This mostly logs in debug mode but emits errors
to the log. Simple implementation that can be extended later.

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-09-06 08:16:17 +00:00
Marco Neumann d0d355ba4d
refactor: unpack record batches later during query (#8663)
For #8350 we want to be able to stream record batches from the ingester
instead of waiting to buffer them fully before the query starts. Hence
we can no longer inspect the batches in the "display" implementation of
the plan.

This change mostly contains the display change, not the actual streaming
part. I'll do that in a follow-up.

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-09-06 08:08:54 +00:00
Nga Tran ecc3a2c416
Merge pull request #8676 from influxdata/ntran/revert-jic
chore: prepare for revert just in case
2023-09-05 23:53:07 -04:00
NGA-TRAN 7380d76993 chore: prepare for revert just in case 2023-09-05 17:40:24 -04:00
Nga Tran 9af06dee9e
feat: have ingester's SortKeyState include sort_key_ids (#8556)
* feat: have ingester's SortKeyState include sort_key_ids

* fix: test failures

* chore: address review comments

* chore: address review comments by asding asserts to catch bugs if any

* chore: fix typo

* test: get column IDs for the tests

* refactor: reuse function

* chore: address review comments
2023-09-05 20:41:15 +00:00
Nga Tran 2a71fcbc76
feat: reland compactor consumes sort_key_ids (#8674) 2023-09-05 18:45:49 +00:00
Nga Tran 5c4ec830c5
Merge pull request #8673 from influxdata/ntran/compact-revert-jic
chore: prepare a revert PR just in case
2023-09-05 13:47:27 -04:00
NGA-TRAN 399c0e257d chore: prepare a revert PR just in case 2023-09-05 13:26:18 -04:00
Nga Tran fb453ede1e
chore: reland 'teach compactor to use sortkey_ids' after catalog migration is fixed (#8575) 2023-09-05 17:05:13 +00:00
Fraser Savage 6e6970cfe1
test(ingester): Cover precedence of `IngestState::read_with_exceptions()` 2023-09-05 17:49:53 +01:00
Fraser Savage c15dfb25b4
test(ingester): Expand `IngestState::read_with_exceptions()` testing
This covers multiple error states and multiple exceptions return the
expected results.
2023-09-05 17:49:51 +01:00
Fraser Savage be9064c75f
feat(ingester): Allow read of `IngestState` with exceptions
This will enable some subsystems to trivially respect any `IngestStateError`
set while ignoring specific errors which they may be responsible for
resolving (such as WAL replay needing to ingest from disk when `DiskFull`
is set).
2023-09-05 16:49:41 +01:00
Dom 91939decbd
Merge pull request #8668 from influxdata/dom/memory-cache-arc
refactor(router): remove unnecessary Arc wrapper in NamespaceCache stack
2023-09-05 14:42:33 +01:00
Dom f5bb59ded9
Merge branch 'main' into dom/memory-cache-arc 2023-09-05 14:35:01 +01:00
Dom 7e6e865bea
Merge pull request #8669 from influxdata/dom/namespace-cache-docs
docs: remove outdated cache race warning
2023-09-05 14:31:39 +01:00
Dom Dwyer 021e22b5bf
refactor: remove Arc wrap from ReadThroughCache
This Arc was unnecessary in most uses.
2023-09-05 14:15:35 +02:00
Dom Dwyer 529f11e85d
refactor: remove Arc wrap from InstrumentedCache
This Arc is unnecessary in most calls.
2023-09-05 14:11:17 +02:00
Dom Dwyer 78d40ba59a
feat(compactor): gossip compaction complete events
Add post-compaction calls to send a "compaction complete" gossip event
containing the set of upgraded, deleted, and newly created parquet
files.
2023-09-05 14:01:09 +02:00
Dom Dwyer 5aee376766
feat(compactor): initialise gossip subsystem
Optionally initialise the gossip subsystem in the compactor.

This will cause the compactor to perform PEX and join the cluster, but
as it registers no topic interests, it will not receive any
application-level payloads.

No messages are currently sent (in fact, gossip shuts down immediately).
2023-09-05 13:58:19 +02:00
Dom Dwyer 871f9b6807
refactor(compactor): sort Cargo.toml dependencies
Alphabetically sort the dependencies to avoid diff noise.
2023-09-05 13:58:02 +02:00
Dom Dwyer b200d82d0f
docs: remove outdated cache race warning
Concurrent writes to the cache no longer overwrite each other - entries
are now merged.
2023-09-05 13:55:56 +02:00
Dom Dwyer bcdafa5f25
refactor: remove Arc wrapper from ShardedCache
This Arc wrapper is unnecessary.
2023-09-05 13:49:57 +02:00
Dom Dwyer 51096119be
refactor: remove Arc from MemoryNamespaceCache
Prior to this commit, the NamespaceCache was only implemented for
Arc<MemoryNamespaceCache> instead of the cache type itself.

In the vast majority of cases, this Arc wrapper is completely
unnecessary - it adds both runtime overhead, and code/type complexity.

This commit impls NamespaceCache for any Arc-wrapped NamespaceCache, and
removes all unnecessary Arc wrapping of the MemoryNamespaceCache.
2023-09-05 13:47:00 +02:00
dependabot[bot] 790e797e6c
chore(deps): Bump regex from 1.9.4 to 1.9.5 (#8667)
Bumps [regex](https://github.com/rust-lang/regex) from 1.9.4 to 1.9.5.
- [Release notes](https://github.com/rust-lang/regex/releases)
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/regex/compare/1.9.4...1.9.5)

---
updated-dependencies:
- dependency-name: regex
  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-09-05 08:26:38 +00:00
Fraser Savage 350d993774
feat(ingester): WAL replay automatic recovery from incomplete WAL write
When we come across an `UnableToReadNextOps` error during Ingester
start-up it means that one of two things has happened:

  1. Ingester crashed mid-flush to WAL, so the write entry is incomplete
     and the user received an error.
  2. The WAL segment file has been corrupted in a way which cannot be
     recovered from. The format does not allow for recovery of a bad
     entry.

In either case we can safely drop the WAL file after all good entries
have been replayed and persisted so as not to block recovery.

See https://github.com/influxdata/influxdb_iox/issues/8613 for more
details.
2023-09-04 18:29:20 +01:00
Fraser Savage c72b2412cd
refactor(ingester): Tie `SegmentId` to WAL op batch iter during WAL replay 2023-09-04 17:03:17 +01:00
Fraser Savage 7d8cc83f26
refactor(ingester): Use generic `SequencedWalOp` batched reader for WAL replay
This decouples the implementation of the `ClosedSegmentFileReader` from
the ability to replay batches of `Vec<SequencedWalOp>`s, making it easy
to test.
2023-09-04 16:38:38 +01:00
Fraser Savage b6e8b9cc5e
docs(wal): Clearly document why `UnableToReadNextOps` is returned
Nothing currently relies on this public error variant, but for automatic
recovery we need the WAL to provide a contract that this error is
returned only when the next operation in the WAL is unsalvageable.
2023-09-04 16:18:21 +01:00
Dom 2e689f250b
Merge pull request #8664 from influxdata/dom/gossip-compaction-crate
feat(gossip): compaction events crate
2023-09-04 15:04:11 +01:00
Dom Dwyer 79ed787d3a
chore: fmt 2023-09-04 15:53:23 +02:00
Dom c4a9a46b3e
Merge branch 'main' into dom/gossip-compaction-crate 2023-09-04 14:52:10 +01:00
Dom 784e20ffd7
Merge pull request #8665 from influxdata/dom/merkle-consistency-probe-rename
refactor(proto): SyncMessage -> ConsistencyProbe
2023-09-04 14:52:01 +01:00
Dom a4b75fb917
docs: copy/paste doc fixes
Co-authored-by: Fraser Savage <fsavage@influxdata.com>
2023-09-04 14:45:36 +01:00
Dom 992bae0c56
Merge branch 'main' into dom/merkle-consistency-probe-rename 2023-09-04 14:43:40 +01:00
kodiakhq[bot] 8f6b416d3f
Merge pull request #8649 from influxdata/savage/cover-wal-replay-of-empty-wal-file
test(ingester): Cover WAL replay of empty files
2023-09-04 13:43:16 +00:00
kodiakhq[bot] 51c2865276
Merge branch 'main' into savage/cover-wal-replay-of-empty-wal-file 2023-09-04 13:37:59 +00:00