Commit Graph

72 Commits (4e2d59d9a5a76d5ab2bdd8745b5b00a1e4e1f253)

Author SHA1 Message Date
Marco Neumann e516f65cbe feat: add WriteChunk job
For #1083.
2021-04-14 12:37:43 +02:00
Marco Neumann ef7de0aa05 feat: add persist flag to LifecycleRules
For #1083.
2021-04-14 12:37:43 +02:00
Marko Mikulicic 59c35e5a4f feat: Implement WriteBuffer gRPC 2021-04-13 21:43:54 +00: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
Carol (Nichols || Goulding) eff6eb6b35 docs: Fix instructions on what files are expected to change 2021-04-12 20:16:18 +00:00
Carol (Nichols || Goulding) 37b7bbc069 docs: Improve instructions for usage of the regenerate flatbuffers script 2021-04-12 20:16:18 +00:00
Nga Tran 7f77a01e61 chore: merged main to branch and resolved conflicts 2021-04-12 12:09:04 -04:00
Nga Tran 453aeaf1a0 feat: Add tests for writing RB chunks to Object Store 2021-04-09 17:39:23 -04:00
Carol (Nichols || Goulding) d84f05b2f5 chore: Revert "Merge pull request #1159 from influxdata/er/flatbuffers"
This reverts commit 0efc1d8174, reversing
changes made to a3e04fecc1.
2021-04-09 17:25:59 +00:00
Carol (Nichols || Goulding) 902bdec5e5 fix: git diff-index doesn't actually check the contents but does check timestamps 2021-04-09 14:31:18 +00:00
Carol (Nichols || Goulding) db639881be feat: Always rebuild flatbuffers so CI will fail until someone fixes it 2021-04-09 14:31:18 +00:00
Carol (Nichols || Goulding) 1a777a5418 feat: Show more info if flatbuffers check fails 2021-04-09 14:31:18 +00:00
Marko Mikulicic e76980928b feat: Implement Update API 2021-04-08 22:25:36 +00:00
Edd Robinson 2bbe5dd46c chore: update flatc sha 2021-04-08 22:16:41 +01:00
Paul Dix 3bb283fe20 chore: make SequencedEntryRaw the method of choice for SequencedEntry 2021-04-08 12:57:11 -04:00
Paul Dix c002d83e9a feat: add SequencedEntryRaw for raw entry bytes 2021-04-08 12:57:11 -04:00
Carol (Nichols || Goulding) c26713727f fix: Don't hardcode fbs filenames 2021-04-08 11:32:33 -04:00
Carol (Nichols || Goulding) 2f2ca866dc chore: Check in CI that generated flatbuffers code has been checked in 2021-04-08 11:19:44 -04:00
Paul Dix 531ffe7ab0 chore: fix fmt and add comment to entry.fbs 2021-04-06 18:53:22 -04:00
Paul Dix a7659addbe chore: cleanup entry.rs based on PR feedback and add better errors 2021-04-06 17:56:58 -04:00
Paul Dix 2a134a3ac1 feat: implment line protocol to flatbuffers
This implements a builder for converting line protocol to the Entry flatbuffers. It also contains wrapper structs to make working with the flatbuffers a little easier.

The flatbuffer needed an addition to keep track of how many bits in the null mask should be used.
2021-04-06 17:56:56 -04:00
Jacob Marble 80d55d0829 chore: rename tracing_deps to observability_deps
OpenTelemetry makes this necessary.
2021-04-02 13:14:30 -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
Paul Dix 3a7c023d35 chore: update entry flatbuffer null mask 2021-03-31 12:43:01 -04:00
Paul Dix abc68ba4bf feat: update flatbuffer table batch to column oriented 2021-03-31 11:52:06 -04:00
Paul Dix 209d1ec0c8 feat: add entry flatbuffer generated code 2021-03-30 18:57:50 -04:00
Paul Dix b7d5087639 feat: add consistency high water mark to segment 2021-03-30 18:57:50 -04:00
Paul Dix 66b50be1d5 feat: add new flatbuffer definitions for entries 2021-03-30 18:57:50 -04:00
Andrew Lamb 7154dfd5f6
feat: Add timestamps to ChunkSummary (#1079)
* refactor: Move timestamps from mutable_buffer::Chunk to catalog::Chunk

* feat: Add timestamps to ChunkSummary

* feat: Add timestamp conversion logic to protobuf types

* test: Add tests

* fix: Update data_types test

* fix: handle negative nanos during conversion

* fix: clippy

* fix: more clippy

* fix: even more clippy

* fix: even more clippy
2021-03-30 19:03:23 +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
Raphael Taylor-Davies 1a4c793270
feat: lifecycle rules (#1045) 2021-03-29 15:32:36 +00:00
Marko Mikulicic 98fe75c989 feat: Add ShardConfig to DatabaseRules proto 2021-03-26 14:07:59 +00:00
Marko Mikulicic cf51a1a3f1 feat: Add API for ShardConfig 2021-03-22 23:28:00 +00:00
Carol (Nichols || Goulding) c47a252c15 feat: Check in generated WAL flatbuffers code 2021-03-22 09:38:59 -04:00
Carol (Nichols || Goulding) 24af745b23 chore: Upgrade to flatbuffers 0.8 2021-03-22 09:38:58 -04:00
Andrew Lamb 3a53923684
feat: Management API + CLI command to close a chunk and move to read buffer (#1002)
* feat: Management API + CLI command to close a  chunk and move to read buffer

* refactor: Less copy-pasta

* fix: track only once, use `let _` instead of `.ok()`

* docs: Apply suggestions from code review

fix comments ( 🤦‍♀️  for copy/pasta)

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

* docs: Update server/src/lib.rs

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

* refactor: Use DatabaseName rather than impl Into<String>

* fix: Fixup logical merge conflicts

Co-authored-by: Carol (Nichols || Goulding) <193874+carols10cents@users.noreply.github.com>
2021-03-17 15:25:27 +00:00
Andrew Lamb ef9c3f3d8f
feat: Management API + CLI command to list chunks in a partition (#995)
* feat: Management API + CLI command to list chunks in a partition

For ease of use

* refactor: remove unecessary Result
2021-03-16 20:10:55 +00: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
Andrew Lamb 4781317647
feat: Management API + CLI command to create a new chunk (rollover partition) (#990)
* feat: Management API + CLI command to create a new chunk (rollover partition)

* fix: Update tests/end_to_end_cases/management_api.rs

fix typo

* fix: logical merge conflict

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-03-15 16:41:18 +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
Andrew Lamb 1b36d6b0cd fix: Return Partition rather than strings 2021-03-12 20:33:39 +00:00
Andrew Lamb cd66814c3d feat: Add management API and CLI for listing partitions 2021-03-12 20:33:39 +00:00
Raphael Taylor-Davies 7e25c4e896
feat: add fanout task tracking (#956)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-03-12 15:01:27 +00:00
Andrew Lamb 2456bc1b28
refactor: impl Error for FieldViolation (#975) 2021-03-12 14:30:45 +00:00
Andrew Lamb 6ac7e2c1a7
feat: Add management API and CLI to list chunks (#968)
* feat: Add management API and CLI to list chunks

* fix: Apply suggestions from code review

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

* fix: add comment to protobuf

* fix: fix comment

* fix: fmt, fixup merge errors

* fix: fascinating type dance with prost generated types

* fix: clippy

* fix: move command to influxdb_iox database chunk list

Co-authored-by: Carol (Nichols || Goulding) <193874+carols10cents@users.noreply.github.com>
2021-03-12 13:56:14 +00:00
Raphael Taylor-Davies d2859a99d0
feat: add google longrunning operations stubs (#959)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-03-10 17:34:07 +00:00
Marko Mikulicic 1b40ca7ab5 feat: Implement CRUD for remote addresses 2021-03-10 13:39:59 +00:00
Paul Dix 706115178b
chore: remove cruft from config/database rules (#935)
The replication, query, and subscription concepts here are going to be signficiantly different. Thought it would be best to just remove this cruft for now to avoid confusion.

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-03-09 13:48:59 +00:00
Andrew Lamb 500c237f62
feat: Add Service + CLI command to write line protocol to IOx (#939)
* feat: Add Service + CLI command to write line protocol to IOx

* fix: clippy

* fix: protobuf lint

* fix: LinePrtocol typo
2021-03-08 17:35:19 +00:00