Commit Graph

735 Commits (f0cca59f202d5ccd16fbaf1a5c98819afd3ee6b2)

Author SHA1 Message Date
Andrew Lamb 40b9b09cdc
refactor: rename assert_table_eq to assert_batches_eq (#1368) 2021-04-30 10:51:08 +00:00
Andrew Lamb eb8d91cf1c
refactor: remove additional uses of RecordBatch::try_new (#1378)
* refactor: remove additional uses of RecordBatch::try_new

* fix: fix accidental change

* fix: clippy

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-04-30 10:24:47 +00:00
Edd Robinson a0753ca227 refactor: DRY metric assertions 2021-04-29 14:00:05 +01:00
Edd Robinson 4311ba18fe feat: instrument measurement_names 2021-04-29 14:00:05 +01:00
Edd Robinson 9f059bc81c feat: instrument measurement_names 2021-04-29 14:00:05 +01:00
Edd Robinson 83978ef4f9 feat: instrument tag_values 2021-04-29 14:00:05 +01:00
Edd Robinson e25dd1836f feat: instrument tag_keys 2021-04-29 14:00:05 +01:00
Edd Robinson a6a5115384 feat: instrument read_window_aggregate 2021-04-29 14:00:05 +01:00
Edd Robinson 89e21003e7 feat: instrument read_group 2021-04-29 14:00:05 +01:00
Edd Robinson e4d6bde9f8 feat: instrument read_filter 2021-04-29 14:00:05 +01:00
Edd Robinson 13fbf2e68d refactor: plumb registry to gRPC server 2021-04-29 14:00:05 +01:00
Andrew Lamb c64f25e777
feat: Add `OBSERVER` mode to SQL repl along with SQL primer / cookbook (#1349)
* feat: add OBSERVER command to repl

* fix: fixup test

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-04-29 11:47:25 +00:00
Raphael Taylor-Davies 262bf446ab
feat: change background worker to use backoff instead of poll (#1339) (#1347)
* feat: change background worker to use backoff instead (#1339)

* chore: fix comment

* chore: fix tests

* chore: review comments

* chore: review feedback
2021-04-29 11:10:51 +00:00
Andrew Lamb a64e622f6e
feat: Add interactive SQL repl (#1332)
* feat: Add interactive SQL repl

* fix: try and fix test

* fix: remove test for prompt

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-04-28 20:41:02 +00:00
Edd Robinson bc799c6cc0 refactor: remove channels from gRPC API 2021-04-28 16:11:57 +00:00
Marko Mikulicic b6054f9df9
feat: Make background task period configurable 2021-04-28 15:47:31 +02:00
kodiakhq[bot] e78a81ee59
Merge branch 'main' into crepererum/ci_doc 2021-04-27 12:03:04 +00:00
kodiakhq[bot] c3cb86fc1a
Merge branch 'main' into crepererum/issue1296 2021-04-27 11:58:10 +00:00
Marco Neumann eddc9319ff docs: deny broken intradoc links 2021-04-27 13:22:28 +02:00
Raphael Taylor-Davies 20117de078
feat: string dictionary encoding (#1220) (#1262)
* feat: string dictionary encoding (#1220)

* chore: review comments

* chore: fix lint

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-04-27 09:36:58 +00:00
Marco Neumann c8594ce743 refactor: chunks shall always have data (= 1 table)
Chunks now always have "data" (aka exactly 1 table including
schema/columns). Open chunks can only be created with data. Rollovers do
NOT create open chunks anymore (this is now only done for incoming
data).

Closes #1296.
2021-04-27 10:28:57 +02:00
Marko Mikulicic b95491f723
fix: Remove authorization header in middleware
__Rationale__

Debug logs in the middle ware (and potentially elsewhere) can cause authorization headers
(containing authentication tokens) to be accidentally leaked in the logs.

It's easy to just remove those headers early in our HTTP middleware.
2021-04-27 09:57:06 +02:00
Marco Neumann c4a5e28bc1 feat: wire up throttled in-mem store 2021-04-27 09:31:48 +02:00
Marko Mikulicic 289332132c
feat: ingest_points_bytes_total records both success and errors (#1312)
__Rationale__

1. It's useful to know how much data we're throwing on the floor due to errors.
   Common ingestion errors are "no such database" or "max hard size reached".
   In both cases it's useful to be quickly able to gauge how much data would
   be ingested once the limiting factor for ingestion is lifted (e.g. the database is created via
   the management interface).

2. The name of the metric is `ingest_points_bytes_total` and the documentation states: `The number of bytes written`
   It's confusing to only count successes while not mentioning this neither in the metric name,
   nor in the metric description.

3. The sister metric `ingest_points_total` already records both successes and failures.

__Changes__

This PR adds a `status` tag to the `ingest_points_bytes_total`, mirroring what
we already do with `ingest_points_total`, so that  both the overall total and the total successfully
ingested bytes can be counted.
2021-04-26 20:53:46 +00:00
Carol (Nichols || Goulding) 272cdb85ce fix: Use the ServerId type everywhere, for writing, querying, anything 2021-04-26 18:44:32 +00:00
Jake Goulding 67f5ad841d refactor: Introduce ServerId and CurrentServerId types 2021-04-26 18:44:32 +00:00
Marko Mikulicic 3b3ac33575
fix: Set a global log/tracing subscriber (#1305)
Closes #1288

__Rationale__

`tracing::subscriber::set_default` only sets the subscriber for the current thread.
However, we're using multi-threaded tokio runtime, which means that most of the threads running
async code won't inherit the tracing subscriber, which means error/info/debug... logs won't be emitted!

To make things even more confusing, some logs do work (because they just happen to run in the same thread
that called `subscriber::set_default`.

__Change__

This PR makes us call `subscriber::set_global_default`.
This call can only be called once and is meant to be invoked by the main program (not by libraries).

It preserves the `TracingGuard` type, but now it's only used to flush the opentelemetry stuff.
2021-04-26 13:45:35 +00:00
Edd Robinson 552409ea70 feat: add metrics for chunk lifecycle 2021-04-23 17:13:43 +00:00
Edd Robinson 7a3f536232 refactor: more API metric coverage 2021-04-23 17:13:43 +00:00
Edd Robinson 59282bce6e refactor: swap existing metrics for THE NEW WAY 2021-04-23 17:13:43 +00:00
Edd Robinson d3218802ab refactor: more API metric coverage 2021-04-23 15:58:48 +00:00
Edd Robinson 87de656d23 feat: metrics test helpers 2021-04-23 15:58:48 +00:00
Edd Robinson ae11983e44 test: verify metrics working 2021-04-23 15:58:48 +00:00
Edd Robinson c596910425 refactor: remove old metrics 2021-04-23 15:58:48 +00:00
Edd Robinson 97b2369140 refactor: swap existing metrics for THE NEW WAY 2021-04-23 15:58:48 +00:00
Marko Mikulicic d45fb7dbb4
feat(iox): Log write points errors at debug level 2021-04-23 15:20:53 +02:00
Marco Neumann f12f1eeef7 refactor: make chunks per-table
This changes the hierarchy from

```
database -> partition -> chunk -> table
```

to

```
database -> partition -> table -> chunk
```

Only the high-level APIs are changed for now. The chunk states (like
MutableBuffer and ReadBuffer) still multiplex tables, although they will
always only get a single table assigned (or no table if no data was
presented yet).

Closes #1256.
2021-04-23 09:18:55 +02:00
Marko Mikulicic 9868e18d0a feat: Log git_hash when starting
Currently we log the git_hash version the binary has been compiled at only when the server actually starts,
which means that we don't easily see the version of the binary when it crashes before starting.
2021-04-22 14:40:48 +00:00
Marko Mikulicic 83d6550316 feat: Implement write_entry_downstream 2021-04-21 20:50:46 +00:00
Carol (Nichols || Goulding) 80995afb70 fix: Change WAL to Write Buffer in comments and documentation 2021-04-21 17:43:03 +00:00
Carol (Nichols || Goulding) ed6025b400 refactor: Rename Wal metadata endpoint types to WriteBuffer 2021-04-21 17:43:03 +00:00
Carol (Nichols || Goulding) 4350a2e5ef fix: Change WAL not found errors to Write Buffer not found 2021-04-21 17:43:03 +00:00
Carol (Nichols || Goulding) cdb9574beb fix: Rename wal/meta as wb/meta 2021-04-21 17:43:03 +00:00
Carol (Nichols || Goulding) 8baeaab8ca refactor: Rename Db.wal_buffer to write_buffer 2021-04-21 17:43:03 +00:00
kodiakhq[bot] dc6637b448
Merge branch 'main' into jgm-tracing-logging 2021-04-20 20:16:40 +00:00
Edd Robinson 8f0ed5e51c refactor: satisfy new clippy lints 2021-04-20 17:30:50 +00:00
Marco Neumann c5d99ba9af feat: wire up hard buffer limit
Fixes #1255.
2021-04-20 13:25:31 +02:00
Jacob Marble eea14bc414 chore: integrate review feedback 2021-04-19 15:48:30 -07:00
Jacob Marble d6ec7a52d9 chore: integrate review feedback 2021-04-19 15:48:30 -07:00
Jacob Marble 32549a6c6f chore: add logfmt to help for flag --log-format 2021-04-19 15:48:30 -07:00