Commit Graph

167 Commits (be9b3a48534e2292d9fc26c4fd1c88c1db72254f)

Author SHA1 Message Date
Andrew Lamb a614fef5bc
chore: remove more unused dependencies (#1658)
* chore: remove more unused deps

* refactor: move benchmarks into server_benchmarks crate
2021-06-09 10:17:20 +00:00
kodiakhq[bot] 87297f7db4
Merge branch 'main' into cn/delete 2021-06-07 13:32:42 +00:00
Raphael Taylor-Davies 5749a2c119
chore: cleanup legacy TSM -> parquet code (#1639)
* chore: cleanup legacy parquet code

* chore: remove tests of removed functionality

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-06-07 12:59:33 +00:00
Carol (Nichols || Goulding) f4a9a5ae56 fix: Remove write buffer 2021-06-04 14:40:17 -04:00
Andrew Lamb 42f26b609b
refactor: Move `query_tests` and `server_benchmarks` into their own crate --> smaller `server` (#1628)
* refactor: Separate query_tests into its own crate

* fix: references

* refactor: break out server benchmarks

* fix: Update query_tests/src/lib.rs

Co-authored-by: Carol (Nichols || Goulding) <193874+carols10cents@users.noreply.github.com>

Co-authored-by: Carol (Nichols || Goulding) <193874+carols10cents@users.noreply.github.com>
2021-06-04 17:31:19 +00:00
Andrew Lamb 00e735ef0d
chore: remove unused dependencies (#1583) 2021-05-29 10:31:57 +00:00
Raphael Taylor-Davies 4fcc04e6c9
chore: enable arrow prettyprint feature (#1566) 2021-05-27 10:28:14 +00:00
Marko Mikulicic 0a37cb80f7
feat: Use jemalloc everywhere instead of malloc
There may be many reasons for the discrepancy in jemalloc reported allocations total sizes and RSS.
One of them is that our binary doesn't use jmalloc for all the allocations.

Turns out that jemallocator only sets the global rust allocator. Any call to `malloc` will still
go throught the system allocator. Presumably those calls come from linked C code,
but it's also not impossible that not all rust code honours the global allocator (I have no idea, but let's see)
2021-05-25 03:42:52 +02:00
Andrew Lamb 14ba25f86d
chore: Update datafusion and use released version of arrow crates (#1546)
* chore: Update datafusion and use released version of arrow crate

* fix: Update for change in API
2021-05-24 15:37:22 +00:00
Marko Mikulicic 40b21dbca1
feat: Add /debug/pprof/profile 2021-05-19 13:08:42 +02:00
Andrew Lamb ebea554e5a
feat: Report num_cpus seen by IOx on startup (#1484) 2021-05-12 13:42:16 +00:00
Raphael Taylor-Davies 10f89a3e8d
refactor: split entry out into separate crate (#1428)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-05-06 11:36:23 +00:00
Raphael Taylor-Davies 7e2e2c4caf
refactor: initial split of observability_deps (#1429) 2021-05-06 08:25:09 +00:00
kodiakhq[bot] 7e01650c53
Merge branch 'main' into reflection 2021-05-05 20:29:13 +00:00
Marko Mikulicic 0d6d94dc00
feat: Enable gRPC reflection 2021-05-05 22:04:47 +02:00
Raphael Taylor-Davies 411cf134e9
refactor: explode arrow_deps (#1425)
* refactor: explode arrow_deps

* chore: workaround doctest bug
2021-05-05 16:59:12 +00:00
Marko Mikulicic b579ef8646
feat: Add jemalloc stats 2021-05-03 12:10:48 +02: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 ea909f45ad feat: RED metrics 2021-04-23 15:58:48 +00:00
Carol (Nichols || Goulding) f0b93c5c8c refactor: Rename the wal crate to write_buffer 2021-04-21 17:43:03 +00:00
Jacob Marble df9dd15ab8 feat(tracing): improve logs and tracing
Logs and traces are emitted via one pipeline. For now, it is not
possible to emit both, but it should be possible in a few weeks, as
tokio/tracing/tracing-subscriber is going through some refactoring recently.

All affected flags are well-documented, and I have tested all but the
OTLP output flags.

chore: clippy happy

chore: revert instrumentation changes

feat: add log format logfmt, log destinations stderr, stdout

chore: clippy happy
2021-04-19 15:48:30 -07:00
Raphael Taylor-Davies 1997324344
feat: mutable buffer snapshotting (#1179)
* feat: mutable buffer snapshotting

* chore: review feedback
2021-04-13 12:14:54 +00:00
Marko Mikulicic e76980928b feat: Implement Update API 2021-04-08 22:25:36 +00:00
Marko Mikulicic df5349406a feat: Switch to jemalloc 2021-04-08 14:19:35 +00:00
Andrew Lamb 03c446ed43
feat: add line protocol ingest metrics (#1119)
* feat: add line protocol ingest metrics

* fix: ensure tests pass correctly when run multi-threaded

* refactor: remove uneeded change

* fix: Add tags to metrics, improve test

* refactor: use global `Counter`

* refactor: move metrics to crate wide struct

* fix: fix test
2021-04-07 21:49:02 +00:00
Raphael Taylor-Davies 9a2e636d8c
refactor: move tracking utilities into separate crate (#1124) 2021-04-06 11:43:11 +00:00
Jacob Marble 80d55d0829 chore: rename tracing_deps to observability_deps
OpenTelemetry makes this necessary.
2021-04-02 13:14:30 -07:00
Jacob Marble e885cf072e feat: add Prometheus metrics endpoint
This change adds HTTP endpoint /metrics. Now, I need to add a metric.
2021-04-02 09:35:16 -07:00
Carol (Nichols || Goulding) 0b880d3534 chore: Group all tracing-related crates under one crate for easier upgrade management 2021-04-02 09:54:39 -04:00
Marko Mikulicic 830676d843 chore: Add the serde feature to bytes dep 2021-04-01 09:00:29 +00:00
Marko Mikulicic 569099fc6e feat: Derive serde for protos
Rationale
---------

Our CLI needs to be able to accept configuration as JSON and render configuration as JSON.

Protobufs technically have an official JSON encoding rule called 'jsonpb` but prost doesn't
offer native supprot for it.

`prost` allows us to specify arbitrary derive metadata to be added to generated
code. We emit the `serde` derive directives in the two packages that generate prost code
(`generated_types` and `google_types`).

We use the `serde(rename_all = "camelCase")` to approximate `jsonpb`.

We instruct `prost` to use `bytes::Bytes` for some types, hence we must turn on the `serde` feature
on the `bytes` dependency.

We also use json to serialize the output of the `database get` command, to showcase the feature
and get rid of a TODO. In a subsequent PR I'll teach `database create` (and the yet to be done `database update`) to accept an option JSON configuration body so we can configure partitioning, lifecycle, sharding etc rules etc.

Caveats
-------

This is not technically `jsonpb`. Main issues:
1. default values not omitted
2. no special rendering of special types like `google.protobuf.Any`

Future work
-----------

Figure out if we can get fully compliant `jsonpb`, or at least a decent approximation.

Effect
------

```console
$ cargo run -- database get foobar_weather
{
  "name": "foobar_weather",
  "partitionTemplate": {
    "parts": [
      {
        "part": {
          "time": "%Y-%m-%d %H:00:00"
        }
      }
    ]
  },
  "lifecycleRules": {
    "mutableLingerSeconds": 0,
    "mutableMinimumAgeSeconds": 0,
    "mutableSizeThreshold": 0,
    "bufferSizeSoft": 0,
    "bufferSizeHard": 0,
    "sortOrder": {
      "order": 2,
      "sort": {
        "createdAtTime": {}
      }
    },
    "dropNonPersisted": false,
    "immutable": false
  },
  "walBufferConfig": null,
  "shardConfig": {
    "specificTargets": null,
    "hashRing": null,
    "ignoreErrors": false
  }
}
```
2021-03-30 15:16:31 +00:00
Andrew Lamb 790e5d3348
refactor: Add fine grained (object level) catalog locking (#1053)
* refactor: inline catalog crate to server

* refactor: Add fine grained (object level) catalog locking

* fix: Move mod definition and use to top of file

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-03-26 13:48:24 +00:00
Andrew Lamb 44d67db733
feat: Rework Db to use Catalog for chunk state (#1043)
* feat: Rework Db to use Catalog for chunk state

* docs: Update server/src/db.rs

* fix: fmt

* fix: fmt

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-03-24 17:57:11 +00:00
Andrew Lamb 4911a01489 feat: Initial catalog objects 2021-03-24 12:30:23 +00:00
Andrew Lamb 6e1795fda0
refactor: Move some types (not yet exposed to clients) into internal_types (#1015)
* refactor: Move some types (not yet exposed to clients) into internal_types

* docs: Add README.md explaining the rationale

* refactor: remove some stragglers

* fix: fix benches

* fix: Apply suggestions from code review

Co-authored-by: Carol (Nichols || Goulding) <193874+carols10cents@users.noreply.github.com>

* fix: add clippy lints

* fix: fmt

* docs: Apply suggestions from code review

fix typos

Co-authored-by: Carol (Nichols || Goulding) <193874+carols10cents@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-03-19 16:27:57 +00:00
Raphael Taylor-Davies 7e6c6d67b4
feat: graceful shutdown (#827) (#1018)
* feat: graceful shutdown (#827)

* chore: additional docs

* chore: further docs

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-03-19 15:36:49 +00:00
Andrew Lamb eca9ef7bdd fix: remove unneded cpu feature check 2021-03-19 09:40:39 -04:00
Raphael Taylor-Davies 3fe1b8c5b7
feat: add longrunning operations client (#981)
refactor: add separate format feature influxdb_iox_client

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-03-16 13:19:44 +00:00
Raphael Taylor-Davies 65f7a1ac5b
fix: use consistent crate versions (#989)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-03-15 15:42:19 +00:00
Marko Mikulicic 9df4131e60 feat: Add server remote [set|remove|list] commands 2021-03-12 10:41:18 +00:00
Andrew Lamb f568c083a4
fix: Do not leave child processes around after the end-to-end test (#955) 2021-03-10 14:25:27 +00:00
Andrew Lamb 1af5cf8b7c
refactor: Move end-to-end test server fixture into its own module (#945)
* refactor: Move test server fixture into its own module

* fix: Update tests/end-to-end.rs

* fix: better error handling and display

* fix: tweak startup message
2021-03-09 19:08:55 +00:00
Raphael Taylor-Davies 5c9dd68bf8
feat: MVP Management CLI (#907)
* feat: MVP CLI implementation

* feat: multiline database description
2021-03-03 17:37:55 +00:00
Raphael Taylor-Davies ffc20fa821
feat: add basic gRPC health service (#862)
* feat: add basic gRPC health service

* feat: update README.md add /health to HTTP API

* feat: add health client to influxdb_iox_client

feat: end-to-end test health check service

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-02-25 13:24:12 +00:00
Jake Goulding 2bd09612bd refactor: Enable parking lot for dependencies 2021-02-22 13:37:35 -05:00
Jake Goulding 6603ecd758 refactor: Unify on once_cell
This is closest in API to what is likely to be added to the standard
library at some point, so let's use it consistently.
2021-02-22 13:37:35 -05:00
Raphael Taylor-Davies 6d3c21b952 feat: Use Bytes instead of Vec<u8> in prost generated code
Also add google.rpc.* Protobuf definitions
2021-02-12 17:10:58 +00:00
Jake Goulding 699f4a577f feat: Add an optional Flight client to the IOx client library 2021-02-10 10:30:05 -05:00
Raphael Taylor-Davies 143488fae9 feat: add WAL metadata endpoint (#724) 2021-02-08 16:21:34 +00:00
Carol (Nichols || Goulding) fbf776c6b3
chore: Clean up Cargo.tomls (#754)
* fix: test_helpers crate should only be a dev-dep

* fix: object_store no longer has a build script, so no longer needs a build dep

* chore: Alphabetize all Cargo.tomls
2021-02-04 18:56:02 -05:00