Commit Graph

9766 Commits (bf1681f4fe99f70edb3b1e98a09396c64f7ccbd7)

Author SHA1 Message Date
kodiakhq[bot] df5ec013d1
Merge branch 'main' into dom/dml-delete-namespace-id 2022-11-07 09:07:38 +00:00
Nga Tran 9356f2a1b9
feat: grpc for updating namespace retention period (#6041)
* refactor: make namespace folder for all namesapce's commands

* feat: WIP for add command to set retention period

* feat: more on updating retention period

* feat: grpc for update namespace retention period

* test: end to end test fpr namespace retention

* fix: lint proto

* chore: cleanup

* chore: kick CI run again

* fix: command hierachy

* chore: fix comments
2022-11-04 20:58:11 +00:00
Carol (Nichols || Goulding) 09e9b69b85
Merge remote-tracking branch 'origin/main' into dom/dml-delete-namespace-id 2022-11-04 14:56:10 -04:00
Carol (Nichols || Goulding) b0dd09e2ea
fix: Specify a namespace ID so the doc test compiles 2022-11-04 14:51:46 -04:00
Carol (Nichols || Goulding) 9b0af96927
docs: Add a link to the idpe issue
Co-authored-by: Andrew Lamb <alamb@influxdata.com>
2022-11-04 13:39:25 -04:00
Carol (Nichols || Goulding) d454c66b4b
fix: Use a HashMap for column lookup instead of Vec ordering
The checks for whether a column already exists with a different type
were relying on ordering of the input matching the ordering of the
columns returned from inserting the columns in Postgres.

Rather than trying to match the new ordering that is required to avoid
Postgres deadlocks, switch from a Vec to a HashMap and look up the
column type from the name.

This also reduces some allocations that weren't really needed.
2022-11-04 11:52:37 -04:00
Carol (Nichols || Goulding) a6634ada19
fix: Add an ORDER BY to the insert to prevent Postgres deadlocks
Fixes influxdata/idpe#16298.

Without this ORDER BY, concurrent writes that add many column records to
this table can deadlock because they grab locks to rows/index entries in
an arbitrary order to check the unique index.

By switching to a consistent order across all requests, inserts won't
get in a deadlock loop waiting for each other.

More info:

- <https://rcoh.svbtle.com/postgres-unique-constraints-can-cause-deadlock>
- <https://dba.stackexchange.com/a/195220/27897>
2022-11-04 11:52:37 -04:00
Carol (Nichols || Goulding) ba53e71935
chore: Upgrade futures-intrusive to avoid a yanked version (#6058) 2022-11-04 15:41:44 +00:00
Andrew Lamb 8c8e607dca
chore: Update datafusion pin (#6054)
* chore: Update datafusion pin

* chore: Run cargo hakari tasks

* chore: Update expected error

Co-authored-by: CircleCI[bot] <circleci@influxdata.com>
2022-11-03 19:41:31 +00:00
Nga Tran 654ed98d1f
feat: config param to set when partition is cold (#6044)
* feat: config param to set when partition is cold

* chore: Apply suggestions from code review

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

* fix: make default 8 hours and avoid using 8 * 60 becasue it is a string, not expression which makes a test fail

Co-authored-by: Andrew Lamb <alamb@influxdata.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-11-03 15:03:56 +00:00
kodiakhq[bot] 5dbf4f47fb
Merge pull request #6007 from influxdata/cn/one-at-a-time-please
fix: Let's not all write to the same file at the same time
2022-11-03 14:00:00 +00:00
kodiakhq[bot] 3fcca070f0
Merge branch 'main' into cn/one-at-a-time-please 2022-11-03 13:53:35 +00:00
YIXIAO SHI 6565352a93
feat: support multiple bootstrap_broker server config (#6045)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-11-03 13:31:23 +00:00
Dom 6847707ebb
Merge pull request #6048 from influxdata/dom/router-delete-namespace-id
refactor(router): pass NamespaceId for deletes
2022-11-03 13:24:22 +00:00
Dom Dwyer 906645c5b6 test(router): assert DmlHandler ID propagation
Adds an integration test asserting that the NamespaceId and Table IDs
are propagated through the router.
2022-11-03 13:57:40 +01:00
Dom Dwyer 6fa48731aa feat: NamespaceId in DmlDelete
Changes the DmlDelete to contain the NamespaceId for which it should be
applied, propagating this value over the wire.

Like the existing IDs within the DmlWrite, these values are marked
unsafe to use due to avoid the consumers utilising them accidentally
during deployment. Unlike DmlWrite, the DmlDelete is completely unused,
so this is less of an issue.
2022-11-03 13:57:40 +01:00
Dom Dwyer a7835009d8 refactor(router): pass NamespaceId for deletes
Pushes the NamespaceId down the DML handler stack like we do for writes.
2022-11-03 13:57:39 +01:00
Dom f20a0648ec
Merge pull request #6047 from influxdata/dom/arcmap
feat: add ArcMap map type
2022-11-03 12:57:21 +00:00
Dom de84c94f23
Merge branch 'main' into dom/arcmap 2022-11-03 11:58:28 +00:00
Andrew Lamb b149dc541a
chore: Export metrics for parquet access to `EXPLAIN ANALYZE` (#6043)
* chore: Export metrics for parquet access

* fix: make parquet_execs non pub
2022-11-03 11:39:16 +00:00
Dom 8cb60febb0
Merge pull request #6046 from influxdata/dom/enum-lint
refactor: disable large variant lint
2022-11-03 10:57:07 +00:00
Dom Dwyer 30f69ce4f6 feat: ArcMap values() snapshot
Returns a snapshot of the values within an ArcMap.
2022-11-03 11:49:01 +01:00
Dom Dwyer 17890a9906 feat: add ArcMap map type
Implements a map of K -> Arc<V> with exactly-once initialisation
semantics.

This map can be used to ensure a given key maps to singleton instances
of V; exactly what all the nodes in the ingester "buffer tree" of shard
-> namespace -> table -> partition require.

This impl contains unused funcs (silenced with an allow(dead_code)) due
to it being picked from a future branch.
2022-11-03 11:29:09 +01:00
Dom Dwyer eb603bfb51 refactor: disable large variant lint
The DataFusionToExprError::UnsupportedOperants variant contains twice as
many Expr to the second biggest variant. This is of a sufficient size
difference to cause a lint warning.
2022-11-03 11:13:07 +01:00
Stuart Carnie f54124102e
fix: InfluxQL parser incompatibilities (#6034)
* fix: Parse regular expressions starting with possible escape sequence

This was failing because the previous combinator, `is_not`, would return
an error if it consumed no input when identifying one of the characters
in its set. This case would then prevent the remainder of the
`regex_literal` parser from identifying and ignoring sequences like "\w"

* fix: Parse microsecond duration literals with correct unit suffix

* fix: Parse a var ref as a 3-part, segmented identifier

Closes #6033

* chore: Address lint warnings

* chore: Additional test cases per feedback
2022-11-03 05:43:16 +00:00
Andrew Lamb 4fb2843d05
refactor: Rename `schema::selection::Selection` to `schema::projection::Projection` (#6037)
* chore: Rename `schema::selection::Selection` to `schema::projection::Projection`

* fix: docs

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-11-02 18:15:04 +00:00
Marco Neumann a38995ca0f
feat: add `MeasurementTagKeys` support to storage CLI (#6039)
Needed this to debug something.

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-11-02 18:08:07 +00:00
Andrew Lamb 58838e214e
feat: enable parquet predicate pushdown in IOx (#5930) 2022-11-02 18:00:47 +00:00
Andrew Lamb 3ba0458653
feat: Add object_store handler to querier so `remote get-table` works (#6014)
* feat: Add object_store handler to querier

* test: end to end test for get-table from querier

* fix: doc links

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-11-02 14:20:26 +00:00
Dom 9fd3d83a85
Merge pull request #6036 from influxdata/dom/kafka-ids
refactor(write_buffer): pass IDs in wire format
2022-11-02 13:07:00 +00:00
Dom Dwyer eec192fa4e fix: test_dml_write_round_trip 2022-11-02 13:43:29 +01:00
Dom Dwyer 8e14b831a6 refactor: avoid redundant string copying 2022-11-02 13:38:22 +01:00
Dom Dwyer 46c921940a docs(write_buffer): fix intra-doc links 2022-11-02 13:33:01 +01:00
Dom Dwyer ddd6ab0ba4 refactor(write_buffer): pass IDs in wire format
This commit is part of a two-part change in order to add the table &
namespace IDs to the write buffer wire format. This commit forms the
first half; changing the producer to send the IDs.

In this commit the new ID values are never read on the consumer side,
ensuring there is no consumer dependency on them. This ensures they
remain operational during a rollout, where the consumer may be updated
to the latest code dependent on the IDs before the producer is updated
to send them. This also ensures we have a window of time where where the
consumers can be rolled back after being updated, and still handle
replaying messages in Kafka.
2022-11-02 13:28:56 +01:00
Andrew Lamb e7e9945207
chore: Update datafusion pin (#6017)
* chore: Update 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-11-02 11:12:21 +00:00
Nga Tran fba4408d05
refactor: move `influxdb_iox debug namespace` command to `influxdb_iox namespace` (#6031)
* refactor: move  command to

* docs: update the doc accordingly

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-11-02 10:57:58 +00:00
kodiakhq[bot] eed62c4709
Merge pull request #6003 from influxdata/dom/router-tableid
refactor(router): pass TableId through handler stack
2022-11-02 10:31:56 +00:00
Dom Dwyer 56f72de1df docs: fix the -> there 2022-11-02 11:21:33 +01:00
Dom Dwyer 2331aaac94 perf(router): remove routing indirection
Removes an unnecessary Arc pointer indirection for routing to the HTTP
handler delegate.
2022-11-02 11:21:33 +01:00
Dom Dwyer b78433bd5d refactor(router): pass TableId through DmlHandlers
Changes the DML handler transformers to pass through the TableId once it
has been resolved during schema validation.

This value is collated by shard, and then unused. This collated TableId
map will be used in a follow-up PR.
2022-11-02 11:21:33 +01:00
Marco Neumann 2e74727baf
fix: handle recursing limit in querier<>ingester comm (#6020)
* test: check server exit status on `TestServer` drop

* fix: handle recursing limit in querier<>ingester comm

Fixes #5974.

* docs: improve

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

* test: simplify

Co-authored-by: Andrew Lamb <alamb@influxdata.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-11-02 09:16:34 +00:00
Marco Neumann e49f2ca5c7
fix: actually enable zstd compression for write write buffer (#6035)
Fixes #5981.
2022-11-02 09:09:35 +00:00
Marco Neumann 45b3984aa3
refactor: simplify `QueryChunk` data access (#6015)
* refactor: simplify `QueryChunk` data access

We have only two types for chunks (now that the RUB is gone):

1. In-memory RecordBatches
2. Parquet files

Loads of logic is duplicated in the different `read_filter`
implementations. Also `read_filter` hides a solid amount of logic from
DataFusion, which will prevent certain (future) optimizations. To enable #5897
and to simplify the interface, let the chunks return the data (batches
or metadata for parquet files) directly and let `iox_query` perform the
actual heavy-lifting.

* docs: improve

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

* docs: improve

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

Co-authored-by: Andrew Lamb <alamb@influxdata.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-11-02 08:18:33 +00:00
Andrew Lamb 1eb0d64210
chore: remove unecessary doc exclude (#6018)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-11-01 20:17:27 +00:00
Nga Tran 50061cd2fe
Merge pull request #6030 from influxdata/ntran/catalog-retention
feat: add catalog columns needed for retention policy
2022-11-01 15:56:33 -04:00
Nga Tran 3aa1b50b6f
Merge branch 'main' into ntran/catalog-retention 2022-11-01 15:39:17 -04:00
Rowan Hamilton 7f8d58e21a
fix: add missing content type in headers for `influxdb2_client` (#6021)
* fix: add missing content-type to buckets

* fix: add missing content-type to label

* fix: add missing content-type to setup
2022-11-01 19:35:45 +00:00
NGA-TRAN 498851eaf5 feat: add catalog columns needed for retention policy 2022-11-01 15:35:15 -04:00
Andrew Lamb 643fd58e02
docs: Document new CLI commands (#6013)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-11-01 16:44:14 +00:00
Cannon Palms 1c22216711
Merge pull request #6019 from influxdata/crepererum/fix_request_canceled
fix: be more conservative w/ "request canceled" messages
2022-11-01 12:22:31 -04:00