Commit Graph

9843 Commits (29bfb4835fee4b4e309edd18e0b6f2bf3ba1eb88)

Author SHA1 Message Date
Carol (Nichols || Goulding) 8dbdab8754
fix: Remove db_name field from DeletePayload
Doesn't seem to be used anywhere.
2022-11-14 16:46:04 -05:00
Carol (Nichols || Goulding) f4b8fe7751
fix: Remove now-unused db_name argument to encode_write 2022-11-14 16:46:04 -05:00
Carol (Nichols || Goulding) 4d4cdebbda
fix: Remove database_name field from DatabaseBatch
It was only being used in one error message.
2022-11-14 16:46:03 -05:00
Carol (Nichols || Goulding) 2c4c578df3
fix: Remove namespace name from IoxHeaders in write messages 2022-11-14 16:46:03 -05:00
Carol (Nichols || Goulding) a5e5d911c2
docs: Remove outdated comments about safety; the temporary unsafe code is gone 2022-11-14 16:46:03 -05:00
Carol (Nichols || Goulding) 0d8e756e1b
fix: Update docs on the ingester-querier protocol.
I believe this fixes #6049.
2022-11-14 16:46:03 -05:00
dependabot[bot] c902f33178
chore(deps): Bump sqlparser from 0.26.0 to 0.27.0 (#6131)
* chore(deps): Bump sqlparser from 0.26.0 to 0.27.0

Bumps [sqlparser](https://github.com/sqlparser-rs/sqlparser-rs) from 0.26.0 to 0.27.0.
- [Release notes](https://github.com/sqlparser-rs/sqlparser-rs/releases)
- [Changelog](https://github.com/sqlparser-rs/sqlparser-rs/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sqlparser-rs/sqlparser-rs/compare/v0.26.0...v0.27.0)

---
updated-dependencies:
- dependency-name: sqlparser
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

* fix: Ignore new modifiers field of the sqlparser Custom data type

See <https://github.com/sqlparser-rs/sqlparser-rs/pull/680>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Carol (Nichols || Goulding) <carol.nichols@gmail.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-11-14 19:56:28 +00:00
kodiakhq[bot] e8b912e049
Merge pull request #6135 from influxdata/cn/document-json-ticket
fix: Improve testing and documentation to clarify Go client behavior
2022-11-14 19:05:09 +00:00
kodiakhq[bot] 1881fa9204
Merge branch 'main' into cn/document-json-ticket 2022-11-14 18:58:52 +00:00
kodiakhq[bot] d0b3ac1cef
Merge pull request #6132 from influxdata/dom/deferred-table-name
perf(ingester): deferred table name discovery
2022-11-14 18:35:35 +00:00
kodiakhq[bot] 6c1e9f04ef
Merge branch 'main' into dom/deferred-table-name 2022-11-14 18:22:46 +00:00
Carol (Nichols || Goulding) fd898cea2a
docs: Correct grammar and update outdated comment 2022-11-14 13:21:55 -05:00
Carol (Nichols || Goulding) b0cf10c9aa
test: Add a test for decoding JSON tickets to ReadInfo
Enshrine in a test what the Go clients are currently sending to avoid
breakage in the future, hopefully.
2022-11-14 12:55:03 -05:00
Carol (Nichols || Goulding) 4f081a8405
fix: Remove 'legacy' from JSON ticket format as it's still used by Go clients 2022-11-14 12:46:58 -05:00
dependabot[bot] a969754819
chore(deps): Bump chrono from 0.4.22 to 0.4.23 (#6129)
* chore(deps): Bump chrono from 0.4.22 to 0.4.23

Bumps [chrono](https://github.com/chronotope/chrono) from 0.4.22 to 0.4.23.
- [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.22...v0.4.23)

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

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

* refactor: chrono future compat

Integer->timstamp conversions should not silently panic.

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>
2022-11-14 13:34:09 +00:00
Dom Dwyer 413b7c8f4a
refactor: use table name from catalog
Changes the TableData within the ingester to utilise a TableNameResolver
to fetch the TableName via the catalog on demand / in the background,
instead of using the table name sent over the write.

This change causes the ingester to perform a catalog query in the
background (or on demand) to resolve the table name. This is a
pre-requisite for removing the table name from the write wire format.
2022-11-14 11:32:22 +01:00
Dom Dwyer 0df6c7877c
refactor: indirect DeferredLoad<TableName> init
Like the NamespaceNameProvider, this commit adds a TableNameProvider to
provide decoupled initialisation of a DeferredLoad<TableName> instead of
hard-coding in a catalog instance / query code, and plumbs it into
position to be used when initialising a TableName.
2022-11-14 11:32:21 +01:00
Dom Dwyer 8dae6d3994
perf(ingester): address tables by ID only
Changes the buffer tree to address TableData by their ID only (removing
support for addressing tables by their string names). This removes the
double reference book keeping / twin indexes and associated overhead.

As part of this change, the TableName is now wrapped in a DeferredLoad
in preparation for removal of the names in the DmlOperation wire format.

This commit also switches the map of TableData within the NamespaceData
(the parent node) to use the ArcMap for faster lookups and DRY
exactly-once initialisation.
2022-11-14 11:27:19 +01:00
kodiakhq[bot] d2c515b069
Merge pull request #6122 from influxdata/dom/internalise-partition-resolver
refactor: internalise PartitionProvider
2022-11-14 09:57:20 +00:00
Dom Dwyer d8fc9ff258
test: fix testing deadlocks
The MemCatalog suffers from deadlocks when attempting to obtain a second
ref to RepoCollection:

    https://github.com/influxdata/influxdb_iox/issues/3859
2022-11-14 10:50:10 +01:00
Dom Dwyer 9e97866b48
refactor: internalise PartitionProvider
Removes the need to leak the PartitionProvider outside of the ingester
crate.

This will allow the PartitionProvider to utilise a
DeferredLoad<TableName> without having to make the DeferredLoad and
TableName pub.
2022-11-14 10:50:05 +01:00
Dom 96a06c060d
Merge pull request #6130 from influxdata/dependabot/cargo/clap-4.0.23
chore(deps): Bump clap from 4.0.22 to 4.0.23
2022-11-14 09:45:10 +00:00
dependabot[bot] f144231e8c
chore(deps): Bump clap from 4.0.22 to 4.0.23
Bumps [clap](https://github.com/clap-rs/clap) from 4.0.22 to 4.0.23.
- [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.22...v4.0.23)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-14 01:07:26 +00:00
kodiakhq[bot] 6fc1bb4e70
Merge pull request #6116 from influxdata/dependabot/cargo/hashbrown-0.13.1
chore(deps): Bump hashbrown from 0.12.3 to 0.13.1
2022-11-11 21:33:28 +00:00
kodiakhq[bot] 05d7d1495e
Merge branch 'main' into dependabot/cargo/hashbrown-0.13.1 2022-11-11 21:26:40 +00:00
kodiakhq[bot] e7ac4eb7fe
Merge pull request #6127 from influxdata/cn/database
fix: Rename more instances of "database" to "namespace"
2022-11-11 21:21:06 +00:00
Carol (Nichols || Goulding) 98621f560b
fix: Remove obsolete SERVER_MODE from the Dockerfile 2022-11-11 16:14:13 -05:00
Carol (Nichols || Goulding) 51afe53d23
fix: Rename database to namespace in service_grpc_flight types, vars, and errors 2022-11-11 16:14:13 -05:00
Carol (Nichols || Goulding) 042bf545fe
fix: Rename database types/vars to namespace in the storage command code 2022-11-11 16:14:12 -05:00
Carol (Nichols || Goulding) 3dde82b3b9
fix: Rename QueryDatabaseProvider to QueryNamespaceProvider 2022-11-11 16:14:12 -05:00
Carol (Nichols || Goulding) 0657ad9600
fix: Rename QueryDatabase to QueryNamespace 2022-11-11 16:14:12 -05:00
Carol (Nichols || Goulding) 621560a0dc
fix: Rename QueryDatabaseMeta to QueryNamespaceMeta 2022-11-11 16:14:12 -05:00
Carol (Nichols || Goulding) d965004e52
fix: Rename DmlError::DatabaseNotFound to NamespaceNotFound 2022-11-11 15:46:05 -05:00
Carol (Nichols || Goulding) bdff4e8848
fix: Consistently use 'namespace' instead of 'database' in comments and other internal text 2022-11-11 15:46:04 -05:00
Nga Tran a3f2fe489c
refactor: remove retention_duration field from namespace catalog table (#6124) 2022-11-11 20:30:42 +00:00
CircleCI[bot] 55f880a498 chore: Run cargo hakari tasks 2022-11-11 18:47:12 +00:00
Jake Goulding 6ca2915d9b fix: missing ahash lockfile entry 2022-11-11 13:27:05 -05:00
Marco Neumann 746032af0f fix: compatibility after hashbrown upgrade
- Some methods need explicit types
- `hashbrown::HashMap` now takes 32 bytes, not 64
2022-11-11 13:25:39 -05:00
Jake Goulding cc17e5a54b refactor: use a workspace dependency for hashbrown 2022-11-11 13:25:39 -05:00
dependabot[bot] 5024523f00 chore(deps): Bump hashbrown from 0.12.3 to 0.13.1
Bumps [hashbrown](https://github.com/rust-lang/hashbrown) from 0.12.3 to 0.13.1.
- [Release notes](https://github.com/rust-lang/hashbrown/releases)
- [Changelog](https://github.com/rust-lang/hashbrown/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/hashbrown/compare/v0.12.3...v0.13.1)

---
updated-dependencies:
- dependency-name: hashbrown
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-11 13:24:56 -05:00
Dom 1b322a6a6e
Merge pull request #6121 from influxdata/dom/deferred-namespace-name
perf(ingester): deferred namespace name discovery
2022-11-11 17:45:31 +00:00
Dom 2e7a1391f8
Merge branch 'main' into dom/deferred-namespace-name 2022-11-11 17:39:10 +00:00
Dom Dwyer 0f6470c390
refactor: use correct description for retries
Use the correct description for namespace query retries.
2022-11-11 18:38:30 +01:00
Dom Dwyer 1e5d3f31af
docs: clearer code comments / docs
Remove redundant comments & clarify returns.
2022-11-11 18:38:29 +01:00
Dom 18c86ca44f
refactor: named unused return
Co-authored-by: Carol (Nichols || Goulding) <193874+carols10cents@users.noreply.github.com>
2022-11-11 17:32:42 +00:00
Nga Tran ea2559a640
chore: update SQL syntax after adding the new column to_delete into table partition (#6123) 2022-11-11 16:21:45 +00:00
Nga Tran 9c4266c503
refactor: first step to remove unused retention_duration (#6113)
* refactor: first step to remove unused retention_duration

* refactor: remove retenion_duration from update catalog

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-11-11 15:21:06 +00:00
Dom Dwyer 2521aedb6a
perf(ingester): address namespaces by ID only
Removes reliance on string name identifiers for namespaces in the
ingester buffer tree, reducing the memory usage of the namespace index
and associated overhead.

The namespace name is required (though unused by IOx) in the IoxMetadata
embedded within a parquet file, and therefore the name is necessary at
persist time. For this reason, a DeferredLoad is used to query the
catalog (by ID) for the name, at some uniformly random duration of time
after initialisation of the NamespaceData, up to a maximum of 1 minute
later. This ensures the query remains off the hot ingest path, and the
jitter prevents spikes in catalog load during replay/ingester startup.

As an additional / easy optimisation, the persist code causes a
pre-fetch of the name in the background while compacting, hiding the
query latency should it not have already been resolved.

In order to keep the the ingester buffer & catalog decoupled / easily
testable, this commit uses a provider/factory trait
NamespaceNameProvider and corresponding implementation
(NamespaceNameResolver) in a similar fashion to the PartitionResolver,
allowing easy mocking for tests, and composition for prod code, allowing
future optimisations such as pre-fetching / caching the "hot" namespace
names at startup.

Internal string identifier removal is a pre-requisite for removing
string identifiers from the write wire format (#4880).
2022-11-11 14:37:21 +01:00
Dom Dwyer 611acc1ad2
refactor: plumb in DeferredLoad<NamespaceName>
Changes the ingester's buffer tree to use the deferred loading primitive
to resolve the namespace name for NamespaceData.

Note that the loader is initialised with the name in the first place -
this commit just introduces the use of the deferred loading primitive,
and doesn't change where the name is sourced from.
2022-11-11 14:37:20 +01:00
Dom Dwyer 3adc66a4b2
feat: Display impl for DeferredLoad
This lets deferred loads be used in place of a non-differed T, such as
log context fields.

If the value has not been resolved, the display impl returns
"<unresolved>".
2022-11-11 14:37:19 +01:00