Commit Graph

192 Commits (f11ad0bf1d079fc03a23af180bb6952bc1b66dc0)

Author SHA1 Message Date
Marco Neumann 60ea637c38 refactor: remove `drop_non_persisted`
This flag should always be `!persist`.

Closes #2212.
2021-08-17 16:53:45 +02:00
Marco Neumann fcf2bee443 feat: drop partition gRPC 2021-08-17 09:44:35 +02:00
Marco Neumann 77892a0998 feat: add API to drop entire partitions 2021-08-17 09:44:35 +02:00
Marco Neumann 42d5f9f3a1 feat: skip replay via CLI 2021-08-16 13:47:07 +02:00
Dom 3de6b44e23
build: use new rustdoc lint name (#2261)
* fix: nocache feature code rot

The MBChunk::snapshot code when using the "nocache" option no longer
compiles - this commit updates it to match the not(nocache) code.

* build: use updated broken_intra_doc_links name

The broken_intra_doc_links lint was renamed
rustdoc::broken_intra_doc_links

https://doc.rust-lang.org/rustdoc/lints.html
2021-08-11 19:48:51 +00:00
Raphael Taylor-Davies 2344c28f4e
feat: drain database jobs on shutdown (#2239)
* feat: drain database jobs on shutdown

* chore: fmt

* chore: review feedback

* chore: use join() not member directly

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-08-10 16:47:37 +00:00
Raphael Taylor-Davies 1f450ef371
feat: add Database abstraction (#2186) (#2203)
* feat: add Database abstraction

* chore: minor tweaks

* chore: remove redundant test fixture restart

* chore: review feedback

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-08-08 17:14:23 +00:00
Andrew Lamb e92e94caad
chore: Update deps (including arrow 5.1.0, tonic -> 0.5, and prost 0.5) (#2172)
* chore: Update deps (including arrow 5.0.0 --> arrow 5.1.0)

* chore: update all the things

* refactor: Update serving readiness check due to change in Tonic API

* chore: update more deps

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-08-05 15:57:38 +00:00
Jacob Marble 98d4c9fca1
feat: switch protobuf write service to canonical definition (#2182)
* feat: switch protobuf write service to canonical definition

The protobuf definition used for the proto write endpoint was a WIP. Now
that a canonical definition exists at
https://github.com/influxdata/influxdb-pb-data-protocol/ we can switch
to that.

* chore: lint etc

* chore: fix rustdoc nit in proto definition comment
2021-08-04 00:16:49 +00:00
Marko Mikulicic fe7f65bfa7
feat(iox): Implement max_active_compactions_cpu_fraction 2021-07-28 17:31:17 +02:00
Carol (Nichols || Goulding) 8add00e761 feat: Make CatalogChunk first/last write times required
Connects to #1927.
2021-07-28 09:22:06 -04:00
Carol (Nichols || Goulding) 7c9a21632b refactor: Organize uses 2021-07-28 09:22:04 -04:00
Jacob Marble 657e769c8c
chore: add go_package to management protos (#2126) 2021-07-27 13:11:17 +00:00
Marko Mikulicic 094945a72d
feat: Add '/dev/null' sink 2021-07-26 19:19:11 +02:00
Marko Mikulicic 2478547ad7
refactor: Remove deprecated target field in RoutingConfig 2021-07-26 17:29:39 +02:00
kodiakhq[bot] 009c77d864
Merge branch 'main' into cn/parquet-first-last 2021-07-26 14:59:54 +00:00
Carol (Nichols || Goulding) 5d9ad4bc31
docs: Fix description of parquet file time of first/last write
Co-authored-by: Andrew Lamb <alamb@influxdata.com>
2021-07-26 09:42:31 -04:00
Marko Mikulicic e5ee252876
feat: Add kafka sink variant 2021-07-26 11:08:02 +02:00
Marko Mikulicic d58a3ccbc7
refactor: Add sink to routing config
This deprecates the "target" field in the RoutingConfig and replaces it with the "sink"
field, which has a variant that accepts a node group.

This commit is backward compatible in that it will accept existing configs.
The configs will roundtrip to the new format though (i.e. `database get` will render
the sink field).
2021-07-26 11:08:01 +02:00
Marko Mikulicic 16a82ba350
refactor: Generailize sinks: Rename Shard to Sink
The ShardConfig applies matchers that resolve to a shard number.
The config then applies a mapping between shard numbers to targets.
The type that encapsulated the target that a shard points to was also called
a "Shard". This is confusing. This commit changes it to "Sink", i.e. a destination
for traffic to go to. Subsequent commits will expand the definition of a Sink to
encompass different kinds of sinks (like kafka write buffer, "devnull", ...)

This changes only the name of the protobuf message and the related rust types,
it doesn't change any name of the json-rendered protobuf configs.
2021-07-26 11:08:00 +02:00
Jake Goulding d928bc84e6 feat: Thread time_of_{first,last}_write through Parquet metadata 2021-07-23 14:07:35 -04:00
Raphael Taylor-Davies 20d06e3225
feat: include more information in system.operations table (#2097)
* feat: include more information in system.operations table

* chore: review feedback

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>
2021-07-22 17:16:09 +00:00
Raphael Taylor-Davies 8c974beba0
feat: add access timestamps to CatalogChunk (#2075) (#2081)
* feat: add access timestamps to CatalogChunk (#2075)

* chore: review feedback

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-07-22 12:19:30 +00:00
Marco Neumann 50241bae9e refactor: do not abuse `uint64::MAX` as sentinal for `None` 2021-07-22 12:51:43 +02:00
Marco Neumann a5fc1c7d38 fix: collect min AND max in database checkpoints
This is required to correctly handle the following case:

1. There are two partitions A and B w/ a single write each (from the same
   sequencer).
2. We persist A:
   - The partition checkpoint for A will be empty because after persistence
     there will be nothing to replay (the single write is persisted and
     we're ready).
   - The database checkpoint that contains the global minimum of all ranges
     recognizes that for the sequencer there is indeed something left (the
     minimum sequence number from B).
3. DB restart happens, replay starts
4. We scan all persisted files, figure out that we have a DB checkpoint
   with a sequence minimum but (w/o the change in this commit) there is no
   maximum. Only partition checkpoints contain maxima, and the only partition
   checkpoint that was persisted was the one for partition A and that one was
   empty (see above).
5. So now how do we recover partition B?
2021-07-21 14:48:29 +02:00
Paul Dix a4704dd165 chore: update parquet_cache_limit to u64 and 0 for default 2021-07-20 15:41:06 -04:00
Paul Dix 297e059085 feat: add parquet cache size setting to database rules 2021-07-20 15:41:06 -04:00
Edd Robinson a852dce450 refactor: default to num_cpu 2021-07-19 14:00:10 +01:00
Edd Robinson 4ca19ad13f refactor: add max_active_compaction config option 2021-07-19 14:00:10 +01:00
Raphael Taylor-Davies 5fc98c7c56
feat: add failure reporting to TaskTracker (#2031)
* feat: add failure reporting to TaskTracker

* chore: review feedback

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-07-19 09:17:20 +00:00
Marco Neumann f57ba6afdb
fix: use fixed-size timestamps for parquet metadata (#2032)
This fixes flaky tests that rely on predictable files sizes.

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-07-16 13:14:02 +00:00
Andrew Lamb 3fd6430fb6
fix: rename `estimated_bytes` to `memory_bytes` and expose `object_store_bytes` in ChunkSummary and system.chunks (#2017)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-07-15 16:00:24 +00:00
Raphael Taylor-Davies a79c0b4e75
feat: add mub row count threshold to lifecycle rules (#1876) (#2016)
* feat: add mub row count threshold to lifecycle rules (#1876)

* chore: update docstring

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-07-15 13:42:17 +00:00
Andrew Lamb 0c86d1dccf
feat: Record parquet bytes size in catalog / parquet_file (#2006)
* feat: Store object store size in parquet_file

* fix: update TRANSACTION_VERSION to 8

* refactor: rename os_bytes --> file_size_bytes
2021-07-15 12:07:11 +00:00
Marco Neumann 956086fa6d feat: add "drop chunk" job type 2021-07-15 12:07:56 +02:00
Marco Neumann e570c66697 feat: add "dropping" chunk lifecycle action 2021-07-15 12:07:56 +02:00
Andrew Lamb d156998b46
fix: remove unused parameter `mutable_linger_seconds` from dbrules (#2003)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-07-14 18:06:20 +00:00
Andrew Lamb 4800b36949 chore: Update IOx to a pre-release version of arrow and datafusion to test out performance improvement 2021-07-13 15:44:57 -04:00
Marco Neumann 157a0cc98c chore: update flatbuffers to 2.0 2021-07-13 15:44:45 +02:00
Andrew Lamb d35b74c226
fix: Fix doc build warnings (#1945)
* fix: Fix doc build warnings

* refactor: add deny bare_urls to crates

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-07-13 08:03:42 +00:00
Marco Neumann 3d008f4d27 feat: add API+CLI to unload chunks
Closes #1919.
2021-07-12 14:06:01 +02:00
Paul Dix 6f2d20cb19 chore: reword comment on late_arrive_window_seconds for clarity 2021-07-11 08:25:31 -04:00
Paul Dix 2854b54420 refactor: leave deprecated mutable_linger_seconds in proto 2021-07-10 12:48:50 -04:00
Paul Dix 0c8c81a321 refactor: remove mutable_linger_seconds from lifecycle
The interplay between mutable_linger_seconds, late_arrive_window and persist_age_threshold_seconds can be tricky to reason about. I realized that the lifecycle rules can be simplified by removing mutable_linger_seconds and instead using late_arrive_window_seconds for the same purpose. Semantically, they basically mean the same thing. We want to give data around this amount of time to arrive before the system persists it, which gives it more of an opportunity to persist non-overlapping data.

When a partition goes cold for writes, after we've waiting past this window, we should compact and persist that partition. This removes one unnecessary knob from the lifecycle configuration and also removes the potential for conflicting configuration options.
2021-07-10 08:04:33 -04:00
Andrew Lamb 9534220035
feat: Add any lifecycle_action to system.chunks and API (#1947) 2021-07-09 17:38:29 +00:00
Paul Dix e41fd2a821 refactor: remove unused mutable_minimum_age_seconds lifecycle setting
Closes #1878
2021-07-08 18:34:01 -04:00
Carol (Nichols || Goulding) e5de73133c feat: Change write buffer connection rule to take either Writing or Reading connection info
A database on one IOx server can, exclusively:

- Not interact with Kafka at all
- Send writes to Kafka
- Read writes from Kafka

Notably, a database on a particular server will never write *and* read from Kafka at the same time.
2021-07-08 09:28:34 -04:00
Carol (Nichols || Goulding) 83e50cfba4 refactor: Rename field to not contain the type 2021-07-08 09:28:34 -04:00
Andrew Lamb 33bc85ad18
feat: Infrastructure for persistence (#1925)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-07-08 11:14:38 +00:00
Marko Mikulicic 7059f16b9e
refactor: Turn mutable_linger_seconds into a non-optional (#1917) 2021-07-08 11:25:57 +02:00