Commit Graph

13344 Commits (0e478af470c719e8b697e1638f35ac7baa97e261)

Author SHA1 Message Date
Andrew Lamb 6e13ff8cb8
chore: Update DataFusion pin (#8390)
* chore: Update DataFusion pin

* chore: Update for API

* fix: update plans

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-08-02 14:58:16 +00:00
Marco Neumann 3969b40925
fix: avoid recursive locking during LRU shutdown (#8395)
* test: regression test for #8378

* fix: avoid recursive locking during LRU shutdown

Fixes the following construct during shutdown:

1. `clean_up_loop` holds `members` lock
2. calls `member.remove_keys`
3. `CallbackHandle::execute_requests` requests upgrades weak ref and gets lock
4. other thread drops last external reference to pool member, the
   upgraded weak ref from (3) is now the last strong ref
5. `CallbackHandle::execute_requests` finishes, drops pool member
6. dropping that pool member calls `ResourcePool::unregister_member`
   which is the same lock as we got in (1) => deadlock

We now just avoid modifying `members` during shutdown and just hold a
weak ref there. As a side effect, the `last_used` addressable heap moves
around a bit an is no longer `Arc`ed (see updated diagram).

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-08-02 14:42:33 +00:00
Chunchun Ye 3a2d41df47
chore(doc): add doc for `namespace create` and `table create` with partition template examples (#8385)
chore(doc): fix typos and format

chore(doc): fix format

chore(doc): rename file

chore(doc): add new file to doc README

chore(doc): format

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-08-02 14:36:41 +00:00
Carol (Nichols || Goulding) 641324b261
docs: Explain TransitionPartitionId more thoroughly
Co-authored-by: Dom <dom@itsallbroken.com>
2023-08-02 10:17:24 -04:00
Carol (Nichols || Goulding) 78db2f0f29
fix: Use TransitionPartitionId in PartitionData 2023-08-02 10:17:23 -04:00
Carol (Nichols || Goulding) 92ae8e4084
refactor: Extract a convenience constructor for Deterministic transition ids 2023-08-02 10:17:23 -04:00
Carol (Nichols || Goulding) e491ec18bb
fix: Have PartitionData use TransitionPartitionId 2023-08-02 10:17:23 -04:00
Carol (Nichols || Goulding) 7d7871e551
fix: Use TransitionPartitionId for sort key resolving 2023-08-02 10:17:23 -04:00
Carol (Nichols || Goulding) a9b0daef8e
fix: Make partition identifier a oneof protobuf field 2023-08-02 10:17:23 -04:00
Carol (Nichols || Goulding) 2546e14a56
feat: Only use TransitionPartitionId in QueryAdaptor
Now that PartitionId is only sent to the querier if there's no hash id
in the catalog, the query adaptor doesn't need to hold onto the catalog
partition ID if we know we're in that case (which the bloom filter will
tell us soon).
2023-08-02 10:17:23 -04:00
Carol (Nichols || Goulding) 71b32d4dd6
fix: Persist Parquet files with the TransitionPartitionId 2023-08-02 10:17:23 -04:00
Carol (Nichols || Goulding) e07a48e350
feat: Only send the hash ID from ingester to querier if in catalog
The catalog ID shouldn't be used anywhere, as the two fields get turned
into a TransitionPartitionId on the querier side.

This will enable us to not query the catalog if we're sure this
partition has a hash ID in the catalog.
2023-08-02 10:17:23 -04:00
Carol (Nichols || Goulding) 308d7f3d4b
feat: Use TransitionPartitionId everywhere in the querier 2023-08-02 10:17:22 -04:00
Carol (Nichols || Goulding) 61a485227a
fix: Update impl QueryChunk for QueryAdaptor 2023-08-02 10:17:22 -04:00
Carol (Nichols || Goulding) ffa09b0911
fix: Update impl QueryChunk for QuerierParquetChunk 2023-08-02 10:17:22 -04:00
Carol (Nichols || Goulding) ea33c06946
fix: Update IngesterChunk's implementation of QueryChunk to return TransitionPartitionId
This doesn't get querier compiling yet.
2023-08-02 10:17:22 -04:00
Carol (Nichols || Goulding) 5db8ed677f
fix: Update compactor's use of QueryChunk to return TransitionPartitionId
Also rename PartitionInfo's transition_partition_id to be partition_id
so that it's consistent with the QueryChunk method. We might want to
rename the partition_id field to catalog_partition_id, but for now I
think the types will make compactor usage clear enough.

This gets compactor to compile and pass its tests.
2023-08-02 10:17:22 -04:00
Carol (Nichols || Goulding) fd147f871b
fix: Have QueryChunk return a TransitionPartitionId
Thus using the PartitionHashId if one is available. This does not
compile yet because of all the uses of QueryChunk, but iox_query
compiles and passes its tests.
2023-08-02 10:17:22 -04:00
Carol (Nichols || Goulding) 6146c1114c
refactor: Rename ARBITRARY_PARTITION_ID to ARBITRARY_CATALOG_PARTITION_ID
I'm going to introduce a new ARBITRARY_PARTITION_ID that will be a
TransitionPartitionId, but there will still be some tests that need a
PartitionId, so rename to disambiguate.
2023-08-02 10:17:22 -04:00
Carol (Nichols || Goulding) e4b9455344
feat: Have QueryChunk return a reference from partition_id() 2023-08-02 10:17:22 -04:00
Carol (Nichols || Goulding) 13d51f40df
fix: Make partition_id optionally sent from ingesters to queriers 2023-08-02 10:17:21 -04:00
Marco Neumann 3fb173ec56
refactor: use errors instead of panic (#8389)
* refactor: use errors instead of panic

* fix: typo
2023-08-02 13:58:55 +00:00
kodiakhq[bot] 4a14e6041e
Merge pull request #8392 from influxdata/savage/benchmark-router-namespace-schema-cache
perf(router): Add benchmark for additions to namespace schema cache
2023-08-02 12:50:46 +00:00
kodiakhq[bot] 101e1eee52
Merge branch 'main' into savage/benchmark-router-namespace-schema-cache 2023-08-02 12:45:55 +00:00
Fraser Savage ff207ec158
fix(router): Use BatchSize::NumIterations(1) for namespace schema cache benchmark
Batches share the same set-up step between iterations, so using a batch
size of more than 1 per setup provides inaccurate readings.
2023-08-02 13:35:55 +01:00
Dom Dwyer 10a3a048d8
feat: NamespaceSchemaGossip cache decorator
This commit adds the NamespaceSchemaGossip type, a decorator of
[`NamespaceCache`] implementations utilising peer gossiping to provide
best-effort convergence of the local cache state.

This decorator will sit in the NamespaceCache stack, allowing it to
receive incoming schema gossip messages, and update the local cache
through the regular NamespaceCache abstraction methods.

This currently implements the message handlers only - no messages are
sent yet!
2023-08-02 14:08:06 +02:00
Dom d40ce5c2e7
Merge pull request #8391 from influxdata/dom/template-proto
refactor: expose partition template protos
2023-08-02 13:06:48 +01:00
Dom 1e5247a6c8
Merge branch 'main' into dom/template-proto 2023-08-02 13:01:48 +01:00
Marco Neumann 9e4e205ffd
refactor: migration checksum type (#8388)
* refactor: use `Box<[...]>` instead of `Vec<...>`

We are not planning to modify the vector, so storing a capacity and a
length is somewhat pointless.

* feat: add printout test for PG migrations

* refactor: use dedicated checksum type

* feat: checksum string roundtrips

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-08-02 11:57:18 +00:00
Fraser Savage 33e4098cf8
perf(router): Add benchmark for additions to namespace schema cache
This benchmark covers two axis of performance for calls to the
namespace cache's `put_schema()` stack. These are the cost of adding
varying numbers of new columns to an existing table in the namespace, as
well as adding new tables with their own set of columns to an existing
namespace.
2023-08-02 12:45:30 +01:00
Dom Dwyer adad6bb631
refactor: must_use annotation for gossip::Builder
Not all use cases will involve sending messages (some will only want to
subscribe to messages) which might result in someone dropping the handle
they're not expecting to use.
2023-08-02 13:36:36 +02:00
Dom Dwyer 117d70d807
docs: GossipHandle::broadcast() blocking semantics
Document what happens when the gossip message queue is full.
2023-08-02 13:36:36 +02:00
Dom Dwyer 6ea8c99c01
refactor: accessor for table partition proto
Allow the Table partition template protobuf to be accessed (if
specified).
2023-08-02 13:36:35 +02:00
Dom Dwyer e3ec091881
refactor: accessor for namespace partition proto
Allow the Namespace partition template protobuf to be accessed (if
specified).
2023-08-02 13:36:34 +02:00
Dom Dwyer 2ebd2e2236
feat: ColumnSchema instantiation from gossip
Implement converting a Column received via gossip into a ColumnSchema.
2023-08-02 13:36:24 +02:00
kodiakhq[bot] 76c766330a
Merge pull request #8382 from influxdata/dom/router-schema-gossip-skeleton
feat(router): schema gossip skeleton
2023-08-02 11:04:53 +00:00
Dom 855a74d9e4
Merge branch 'main' into dom/router-schema-gossip-skeleton 2023-08-02 11:59:15 +01:00
Marco Neumann 65846e45a8
docs: explain migration transaction handling (#8387)
Forgot to update the docs in #8373.

This will be updated again after I've finished #7897.

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-08-02 10:04:15 +00:00
dependabot[bot] 5004f3e460
chore(deps): Bump cc from 1.0.79 to 1.0.80 (#8386)
Bumps [cc](https://github.com/rust-lang/cc-rs) from 1.0.79 to 1.0.80.
- [Release notes](https://github.com/rust-lang/cc-rs/releases)
- [Commits](https://github.com/rust-lang/cc-rs/compare/1.0.79...1.0.80)

---
updated-dependencies:
- dependency-name: cc
  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-08-02 08:29:07 +00:00
Nga Tran dac0db2196
feat: add sort_key_ids into sqlite catalog (#8384) 2023-08-01 20:15:27 +00:00
Dom Dwyer 41c9604e46
feat(router): schema gossip skeleton
Adds the supporting types required to integrate the generic gossip crate
into a schema-specific broadcast primitive.

This commit implements the two "halves":

    * GossipMessageDispatcher: async processing of incoming gossip msgs
    * Handle: the send-side handle for async sending of gossip msgs

These types are responsible for converting into/from the serialised
bytes sent over the gossip primitive into application-level / protobuf
types.
2023-08-01 17:11:09 +02:00
kodiakhq[bot] 4a18df53c6
Merge pull request #8379 from influxdata/dom/schema-gossip-proto
feat(gossip): schema diff message proto
2023-08-01 14:42:40 +00:00
Dom 7be84a8e36
Merge branch 'main' into dom/schema-gossip-proto 2023-08-01 15:37:43 +01:00
Chunchun Ye c8242c7469
chore(cli): add `--partition-template` to `namespace create` (#8365)
* chore(cli): add `--partition-template` to namespace create

* chore: fix typo in doc for `PartitionTemplateConfig`

chore: add max limit 8 for partition template in doc

* chore: add e2e tests

* chore: fmt

* chore: add more e2e tests for namespace create with partition template

* chore: show doc comments in cli help interface

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-08-01 14:37:00 +00:00
Dom ea4950a7f2
Merge branch 'main' into dom/schema-gossip-proto 2023-08-01 15:36:56 +01:00
Nga Tran 73f38077b6
feat: add sort_key_ids as array of bigints into catalog partition (#8375)
* feat: add sort_key_ids as array of bigints into catalog partition

* chore: add comments

* chore: remove comments to avoid changing them in the future due to checksum requirement

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-08-01 14:28:30 +00:00
Dom 2ab91e31fa
Merge branch 'main' into dom/schema-gossip-proto 2023-08-01 15:10:23 +01:00
kodiakhq[bot] 4994157910
Merge pull request #8380 from influxdata/savage/configure-router-health-probe-numbers
feat(router): Expose `num_probes` request count used to health-check ingesters as config option
2023-08-01 13:57:41 +00:00
Fraser Savage df2c1850fb
refactor(router): Try to fix rustfmt having a nap 2023-08-01 14:51:20 +01:00
Fraser Savage a05fecd8dd
docs(router): Clearer documentation of probe request behaviour
Co-authored-by: Dom <dom@itsallbroken.com>
2023-08-01 14:48:18 +01:00