Commit Graph

9372 Commits (475c8a07045daeb731c0b9ee2d7b4be55ffbcb0f)

Author SHA1 Message Date
Luke Bond 475c8a0704
fix: only emit ttbr metric for applied ops (#5854)
* fix: only emit ttbr metric for applied ops

* fix: move DmlApplyAction to s/w accessible

* chore: test for skipped ingest; comments and log improvements

* fix: fixed ingester test re skipping write

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-10-14 12:06:49 +00:00
Carol (Nichols || Goulding) efb964c390
feat: Enforce table column limits from the schema cache (#5819)
* fix: Avoid some allocations by collecting instead of inserting into a vec

* refactor: Encode that adding columns is for one table at a time

* test: Add another test of column limits

* test: Add below/above limit tests for create_or_get_many

* fix: Explicitly DO NOT check column limits when inserting many columns

* feat: Cache the max_columns_per_table on the NamespaceSchema

* feat: Add a function to validate column limits in-memory

* fix: Provide more useful information when over column limits

* fix: Swap types to remove intermediate allocation

* docs: Explain the interactions of the cache and the column limits

* test: Actually set up test that showcases column limit race condition

* fix: Allow writing to existing columns even if table is over column limit

Co-authored-by: Dom <dom@itsallbroken.com>
2022-10-14 11:34:17 +00:00
Stuart Carnie 81722dc19b
feat: AST traversal using Visitor pattern (#5796)
* feat: Partition implementation of Visitable for InfluxQL AST

* feat: Added consistent structures for each clause to simplify visitor

Continued to expand `accept` and `pre` / `post` visit implementations.

* feat: Added insta and tests using snapshots (thanks @crepererum)

The insta crate simplifies the process of validating the combination of
visitor and accept implementations are called and in the correct order.

* chore: Run cargo hakari tasks

* feat: Added remaining snapshot tests

Some tests are failing as some minor type changes must be added along
with the addition of related visitor functions.

* feat: Add types to represent each clause in numerous statements

These clauses permit distinct visit functions on the `Visitor` type.

* chore: Reformat `SELECT`

* chore: Explicitly specify access to export selected types only

This required completing all the missing documentation for the exported
types.

* chore: Update Cargo.lock

* chore: macro to implement common traits and hide 0th tuple element

Co-authored-by: CircleCI[bot] <circleci@influxdata.com>
2022-10-13 22:37:49 +00:00
Andrew Lamb 9134ccd6c3
chore: Update datafusion again (#5855)
* chore: Update datafusion

* chore: Updates for changes in datafusion

* chore: more updates

* fix: update doc example

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-10-13 19:18:57 +00:00
kodiakhq[bot] 20095c16c9
Merge pull request #5849 from influxdata/cn/l2-limits
test: Add verification that aspects of L1 -> L2 compaction are working as expected
2022-10-13 18:32:51 +00:00
Carol (Nichols || Goulding) 082d045633
fix: Update test compactor limit values 2022-10-13 14:25:10 -04:00
Carol (Nichols || Goulding) cdd01eb3fc
test: Verify L1 files chosen for compaction are limited by the memory budget 2022-10-13 14:15:39 -04:00
Carol (Nichols || Goulding) 3cdf2556ec
test: Verify L1 files in a group by themselves get upgraded to L2 2022-10-13 14:15:39 -04:00
kodiakhq[bot] 1ebf2bcc3c
Merge pull request #5852 from influxdata/dom/no-persist-lookups
perf(ingester): reduce catalog queries during persist()
2022-10-13 15:21:08 +00:00
kodiakhq[bot] 3039b5877b
Merge branch 'main' into dom/no-persist-lookups 2022-10-13 15:13:36 +00:00
Dom Dwyer 86d28d3359 fix: update cached sort key
Once persist() has successfully updated the sort key in the catalog, set
the partition sort key cache to reflect the new value.
2022-10-13 17:12:07 +02:00
Nga Tran fab3cd845c
feat: add memory need for output streams into our estimation (#5847)
* feat: add memory need for output streams into our estimation

* test: modify tests to have better coverage

* refactor: use constants isntead of numbers

* chore: address review comments

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-10-13 14:31:19 +00:00
kodiakhq[bot] b3786e4280
Merge pull request #5853 from influxdata/dom/consistent-shard
refactor(ingester): log shard_id in op result
2022-10-13 13:52:42 +00:00
Dom Dwyer 9c40d80032 refactor(ingester): log shard_id in op result
Include the shard ID in the op apply result to correlate it with other
log messages.
2022-10-13 15:41:48 +02:00
Dom Dwyer 3e70dc44a0 refactor(catalog): remove partition_info_by_id()
This method used to return a subset of partition metadata, and was used
exclusively for persistence in the ingester. It is now no longer
necessary.
2022-10-13 15:26:36 +02:00
Dom Dwyer 3fbeaa1314 refactor: assert monotonic partition persistence
Copies the existing monotonic partition persistence check into the
partition too - this ensures that even if the partitions are persisted
in order, they are never marked as persisted OUT of order.
2022-10-13 15:26:36 +02:00
Dom Dwyer 920f7edf75 refactor: defer querying for table schema
Do not query for the table schema until it is needed.
2022-10-13 15:26:36 +02:00
Dom Dwyer e556677192 perf(ingester): remove persist lookup queries
Removes the catalog queries previously used to look up various
information about the partition/table/namespace that was already in
memory.

As part of this change, the compaction helper function is changed to
accept the inputs it needs, rather than a struct of data from the
catalog - this significantly simplifies testing.

This commit also adds additional context to all log messages in the
persist() fn.
2022-10-13 15:26:36 +02:00
Dom Dwyer 10d77b0ef7 refactor: use deferred sort key loading
Changes the persist() implementation in the ingester to load the sort
key using the deferred loading mechanism, instead of on-demand.
2022-10-13 15:26:36 +02:00
kodiakhq[bot] 8942b9043b
Merge pull request #5851 from influxdata/dom/log-sequence-numbers
refactor: include sequence numbers in apply() logs
2022-10-13 12:27:37 +00:00
Dom Dwyer dbcbb5b824 refactor: include sequence numbers in apply() logs
Include the op sequence number in the error/success apply() log
messages.
2022-10-13 14:19:02 +02:00
Dom f9b4fde1a9
Merge pull request #5850 from influxdata/dom/cheapen-table-lookup
perf(ingester): cheapen table lookup
2022-10-13 12:57:54 +01:00
Dom Dwyer 3e1e4c1f0b refactor: remove Table::get_table_persist_info()
Remove the now-redundant get_table_persist_info() implementations.
2022-10-13 13:44:50 +02:00
Dom Dwyer 15e153a74c perf(ingester): cheaper table discovery
This commit changes the table ID lookup query from an expensive,
JOIN multi-query to a simple, single table, indexed lookup.

As this is on the hot path, this should help with the recovery rate of
the ingesters.
2022-10-13 13:44:50 +02:00
Andrew Lamb 227ecd4da1
refactor: Move http delete parsing code into router along side other http code (#5841) 2022-10-13 11:08:42 +00:00
Carol (Nichols || Goulding) 442a7ff2a4
revert: "revert: rdkafka/rskafka swapping (#5800)" (#5844)
* revert: "revert: rdkafka/rskafka swapping (#5800)"

This reverts commit b77c3540e1.

* test: Verify write buffer connection_config is parsed as expected

* test: Failing test reproducing the error seen when deploying rdkafka

* fix: Translate k8s-idpe configs to rdkafka configs
2022-10-13 09:33:06 +00:00
Andrew Lamb 76b2f8d9d0
chore: update dpes (#5846)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-10-13 09:12:57 +00:00
Andrew Lamb 1a77c509c0
docs: Add some doc comments to the datafusion_util module (#5842)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-10-13 09:05:01 +00:00
Andrew Lamb 027636aad2
chore: remove vestigal DML handling from ioxd_common (#5840)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-10-13 08:57:18 +00:00
kodiakhq[bot] b5973b5575
Merge pull request #5843 from influxdata/dependabot/cargo/clap-4.0.14
chore(deps): Bump clap from 4.0.7 to 4.0.14
2022-10-12 17:37:19 +00:00
kodiakhq[bot] e39434ce5c
Merge branch 'main' into dependabot/cargo/clap-4.0.14 2022-10-12 17:29:37 +00:00
Nga Tran 1400bf99e4
refactor: split memory estimation into bytes to store and bytes to stream (#5845)
* refactor: split memory estimation into bytes to store and bytes to stream

* chore: cleanup

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-10-12 16:59:51 +00:00
dependabot[bot] e20fd95db7
chore(deps): Bump clap from 4.0.7 to 4.0.14
Bumps [clap](https://github.com/clap-rs/clap) from 4.0.7 to 4.0.14.
- [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.0.7...v4.0.14)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-12 16:42:21 +00:00
Andrew Lamb d57c99638c
chore: Update datafusion + `arrow`, `arrow-flight`, and `parquet` to 24.0.0.0 (#5792)
* chore: Update datafusion + `arrow`, `arrow-flight`, and `parquet` to 24.0.0.0

* fix: Update for coercion, fix explain plans for change in column name display

* chore: Update datafusion lock

* fix: Update for other API changes

* chore: Update to latest datafusion pin

* 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-10-12 16:19:14 +00:00
Nga Tran f05ca867a5
feat: add file size into estimated memory (#5837)
* feat: add file size into estimataed memory

* chore: cleanup

* chore: fmt

* chore: Apply suggestions from code review

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

* chore: run fmt after applying review suggestion

* fix: fix tests towork with the change for review suggestion

Co-authored-by: Andrew Lamb <alamb@influxdata.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-10-12 14:42:53 +00:00
kodiakhq[bot] c9672bdc65
Merge pull request #5761 from influxdata/dependabot/cargo/clap-4.0.2
chore(deps): Bump clap from 3.2.22 to 4.0.7
2022-10-12 14:09:54 +00:00
kodiakhq[bot] 266b8f2a58
Merge branch 'main' into dependabot/cargo/clap-4.0.2 2022-10-12 14:01:28 +00:00
dependabot[bot] 7202dddab6
chore(deps): Bump tokio-stream from 0.1.10 to 0.1.11 (#5838)
Bumps [tokio-stream](https://github.com/tokio-rs/tokio) from 0.1.10 to 0.1.11.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-stream-0.1.10...tokio-stream-0.1.11)

---
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>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-10-12 12:37:24 +00:00
Luke Bond 11900cea4d
chore: add some tracing logs to the ingester (#5839) 2022-10-12 12:10:20 +00:00
Nga Tran b7153862b0
refactor: due to limit in size uplaoed to S3, we need to split output file of cold compaction, too (#5834)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-10-11 17:22:19 +00:00
kodiakhq[bot] 990fa55e28
Merge pull request #5832 from influxdata/dom/move-query-types
refactor: move query types to query_handler
2022-10-11 16:14:01 +00:00
Dom Dwyer b294bb98aa refactor: move query types to query_handler
Moves types that are only used for handling queries to the query_handler
module.
2022-10-11 17:58:55 +02:00
kodiakhq[bot] 7c9a26849b
Merge pull request #5831 from influxdata/dom/remove-tombstones
refactor(ingester): remove tombstone support and delete tests from `query_tests`
2022-10-11 15:22:24 +00:00
kodiakhq[bot] 96ff3b020a
Merge branch 'main' into dom/remove-tombstones 2022-10-11 15:14:54 +00:00
Dom Dwyer c4f542bbe2 refactor(ingester): remove tombstone support
This commit removes tombstone support from the ingester, and deletes
associated code/helpers/tests. This commit does NOT remove tombstone
support from any other service, but MAY include removing overlapping
test coverage.

This also removes the tombstone support from the Ingester -> Querier RPC
response message.

This has the nice side effect of removing a whole lot of thread spawning
in the ingester tests for the Executor, speeding everything up!
2022-10-11 13:10:04 +02:00
kodiakhq[bot] a205c01b16
Merge pull request #5830 from influxdata/dom/revert-rdkafka
revert: rdkafka/rskafka swapping (#5800)
2022-10-11 11:10:01 +00:00
Dom Dwyer b77c3540e1 revert: rdkafka/rskafka swapping (#5800)
This reverts commit 33391af973.
2022-10-11 13:01:10 +02:00
Luke Bond fda1479db0
chore: add trace log to ingester to aid debugging (#5829) 2022-10-11 10:33:42 +00:00
Carol (Nichols || Goulding) 33391af973
feat: Swap Kafka Producer implementation back to rdkafka as diagnosis of latency problem (#5800)
* feat: Add back rdkafka dependency

* feat: Remove RSKafkaProducer

* feat: Remove write buffer RecordAggregator

* feat: Add back rdkafka producer

Using code from 58a2a0b9c8311303c796495db4f167c99a2ea3aa then getting it
to compile with the latest

* feat: Add a metric around enqueue

* fix: Remove unused imports

* fix: Increase Kafka timeout to 20s

* docs: Clarify that Kafka topics should only be created in test/dev envs

* fix: Remove metrics that aren't needed for this experiment

Co-authored-by: Dom <dom@itsallbroken.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-10-11 09:14:45 +00:00
Dom 2b5ca28374
Merge pull request #5827 from influxdata/dependabot/cargo/object_store-0.5.1
chore(deps): Bump object_store from 0.5.0 to 0.5.1
2022-10-11 10:05:31 +01:00