Commit Graph

2181 Commits (bccac45c75767b7ec53cb2d3be976f078582d9f5)

Author SHA1 Message Date
Nga Tran bccac45c75 chore: Merge remote-tracking branch 'origin' into ntran/parquet_write 2021-03-30 18:31:32 -04:00
Nga Tran 0bcd52d5c9 feat: Add more changes 2021-03-30 18:31:09 -04:00
Raphael Taylor-Davies d8d5b1568a
feat: automated chunk closing (#1074)
* feat: automated chunk closing

* chore: remove unused error variant

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-03-30 15:31:09 +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
Nga Tran 1a0e698571 feat: initial of write chunks to parquet files 2021-03-30 09:56:53 -04:00
kodiakhq[bot] bbfc49bacd
Merge pull request #1072 from influxdata/alamb/show_tables
feat: Add support for listing tables via information_schema.tables
2021-03-30 13:52:12 +00:00
Andrew Lamb f0b411cd43 feat: enable information_schema 2021-03-30 09:01:43 -04:00
Andrew Lamb 865910ae5b chore: update dependencies 2021-03-30 09:01:35 -04:00
Andrew Lamb 0b7dea09d5
refactor: Remove `MutableBufferDb` and Partition (#1068)
* refactor: Move test for missing tags as null to db

* refactor: move last_write_at and create_time to catalog partition

* refactor: remove mutable buffer partition and port tests

* fix: port over partition sorting logic

* fix: remove stale comment

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-03-30 12:51:37 +00:00
Raphael Taylor-Davies 15e1f9c6ec
refactor: use optional non-zero types (#1071) 2021-03-30 11:53:54 +00:00
Raphael Taylor-Davies 18f3124721
refactor: remove DbCatalog newtype wrapper (#1067)
* refactor: remove DbCatalog newtype wrapper

* chore: review comments

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-03-30 07:52:16 +00:00
kodiakhq[bot] c30eaffe94
Merge pull request #998 from jeivardan/feature-setup
feat: Add support for setup API to influxdb_client
2021-03-29 20:38:06 +00:00
kodiakhq[bot] d01ed8dc1a
Merge branch 'main' into feature-setup 2021-03-29 20:25:13 +00:00
Andrew Lamb 6a48001d13
refactor: Manage storage directly in the Catalog (#1057)
* refactor: Manage mutable buffer chunks directly

* fix: do not use mutable_buffer for listing table names
2021-03-29 17:55:07 +00:00
Raphael Taylor-Davies 1a4c793270
feat: lifecycle rules (#1045) 2021-03-29 15:32:36 +00:00
Andrew Lamb eb0122655d
refactor: Remove async from PartitionChunk (#1062)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-03-29 13:00:36 +00:00
Andrew Lamb 02ae743e8e
refactor: Remove async from Database (#1063) 2021-03-29 12:48:12 +00:00
Raphael Taylor-Davies fb130ea99d
feat: use CatalogProvider and SchemaProvider (#1058)
* feat: use CatalogProvider and SchemaProvider

* refactor: review comments
2021-03-29 11:08:46 +00:00
Wakahisa b33d97c946
refactor: write nanosecond timestamps to parquet (#1030)
* feat: write nanosecond timestamps to parquet

* chore: update arrow deps

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-03-27 19:00:57 +00:00
Andrew Lamb 0ca9ad7285
refactor: Remove async from `PartitionChunk::table_schema` (#1060) 2021-03-27 18:08:12 +00:00
Andrew Lamb 663d4fb6f7
docs: Use Scan rather than InMemoryScan for clarity (#1049)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-03-26 14:22:49 +00:00
Marko Mikulicic 98fe75c989 feat: Add ShardConfig to DatabaseRules proto 2021-03-26 14:07:59 +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
Marko Mikulicic cd94544e93 feat: Add prototxt script 2021-03-26 12:40:56 +00:00
Aakash Hemadri 82cabae571
fix: Remove unnecessary unwrap
Replace Option<bool> with bool

Signed-off-by: Aakash Hemadri <aakashhemadri123@gmail.com>
2021-03-26 09:41:17 +05:30
kodiakhq[bot] 5750a69c75
Merge pull request #1050 from influxdata/ntran/1048
fix: support upper case for scientific notation
2021-03-25 17:33:34 +00:00
kodiakhq[bot] c15a2251f5
Merge branch 'main' into ntran/1048 2021-03-25 17:21:31 +00:00
Nga Tran dd3a6a2d2e refactor: make a tuple for 4 choices 2021-03-25 13:20:32 -04:00
Nga Tran 5dfa84f0bb fix: add e- and E- 2021-03-25 12:48:16 -04:00
Raphael Taylor-Davies 1b3fa7c5e8
fix: increase timing tolerance for tracker timing test (#1051) (#1052)
* fix: increase timing tolerance for tracker timing test (#1051)

* fix: fmt

Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
2021-03-25 15:09:09 +00:00
Nga Tran 31389f88df refactor: use alt to reduce code line 2021-03-25 11:02:08 -04:00
Nga Tran ac480d8d8f fix: support upper case for scientific notation 2021-03-25 10:14:31 -04:00
Raphael Taylor-Davies cda7d13110
refactor: unify serialization of database rules (#973) (#1047)
* refactor: unify serialization of database rules (#973)

* chore: fix test

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-03-25 14:13:14 +00:00
Andrew Lamb 895e808754
chore: Upgrade arrow deps (#1046)
* chore: Upgrade dependencies

* chore: upgrade query for new interfaces

* chore: update read_buffer
2021-03-25 13:35:08 +00:00
Aakash Hemadri be6e72bad3
fix: Replace Option<Vec<T>> with Vec<T>
Signed-off-by: Aakash Hemadri <aakashhemadri123@gmail.com>
2021-03-25 12:29:39 +05:30
Aakash Hemadri f80a3ee0a6
fix: Derive default for resource, bucket and retention_rules
Signed-off-by: Aakash Hemadri <aakashhemadri123@gmail.com>
2021-03-25 12:19:11 +05:30
Aakash Hemadri a9fca31498
fix: Make Default impl concise
Return Self::default() where applicable for Self::new()

Signed-off-by: Aakash Hemadri <aakashhemadri123@gmail.com>
2021-03-25 12:03:38 +05:30
Aakash Hemadri 7d4e51df2b
fix: Make serde renames concise
Replace serde(rename = "") with serde(rename_all = "camelCase") where
applicable

Signed-off-by: Aakash Hemadri <aakashhemadri123@gmail.com>
2021-03-25 12:01:56 +05:30
Andrew Lamb 4cbf7c6ae5
refactor: Make `Db::mutable_buffer_chunks` and `Db::read_buffer_chunks` private (#1044)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-03-24 20:57:15 +00:00
kodiakhq[bot] 5f3fb35da1
Merge pull request #936 from mitch292/(fix)issue-835-wrong-http-status-write-path
fix: Sends 404 status code for invalid write path
2021-03-24 18:24:45 +00:00
kodiakhq[bot] f2fcaa85cc
Merge branch 'main' into (fix)issue-835-wrong-http-status-write-path 2021-03-24 18:13:26 +00:00
Carol (Nichols || Goulding) db028a412d Merge remote-tracking branch 'origin/main' into (fix)issue-835-wrong-http-status-write-path 2021-03-24 13:57:37 -04: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
Nga Tran 5b9313bc73
Merge pull request #1040 from influxdata/ntran/support_scientic_notation
feat: support sicientific float data type
2021-03-24 09:42:01 -04:00
Nga Tran 5c9a433c59
Merge branch 'main' into ntran/support_scientic_notation 2021-03-24 09:22:06 -04:00
Andrew Lamb 90341b262a fix: improve comments 2021-03-24 12:30:23 +00:00
Andrew Lamb cdb5b64beb refactor: store Chunks on Partitions 2021-03-24 12:30:23 +00:00
Andrew Lamb 4911a01489 feat: Initial catalog objects 2021-03-24 12:30:23 +00:00
Raphael Taylor-Davies 360df39d4c
feat: per-Db background tasks (#1032)
* feat: per-Db background tasks (#1007)

* chore: review comments

* fix: ensure tracker registry is drained on shutdown

* chore: formatting

* chore: further review fixes

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-03-24 09:43:52 +00:00
kodiakhq[bot] 7e24dc0d0d
Merge branch 'main' into ntran/support_scientic_notation 2021-03-24 09:18:42 +00:00