Commit Graph

889 Commits (23280d0489112d50ab3c7952f4dfb68f8663c971)

Author SHA1 Message Date
Carol (Nichols || Goulding) 815347b18a
fix: Disown in the disown tests, not delete 2021-11-12 09:47:25 -05:00
Marco Neumann 3220970fea fix: server IDs for routers on startup 2021-11-12 11:31:52 +01:00
Marco Neumann f2c90d9259 tests: allow creation of test servers w/ server IDs set on startup 2021-11-12 11:31:52 +01:00
Marco Neumann c1827cf2c3 refactor: `s/writer_id/server_id/g` 2021-11-12 11:31:52 +01:00
Marco Neumann 7f021f556d tests: improve `TestConfig` to better support server types 2021-11-12 11:31:52 +01:00
Marco Neumann 8c1cf00164 feat: improve and test handling of updating a server ID a 2nd time 2021-11-12 11:31:52 +01:00
Marco Neumann 7ef762a88e tests: add `test_serving_readiness_router` 2021-11-12 11:31:52 +01:00
Carol (Nichols || Goulding) 84a5df44e3
fix: Let structopt handle parsing Uuid 2021-11-11 14:37:19 -05:00
kodiakhq[bot] 95c46e58bc
Merge branch 'main' into jpg/restore-uuid-bytes 2021-11-11 15:34:23 +00:00
Carol (Nichols || Goulding) 19d5200d1c
test: Make assertion more concise and avoid an allocation, thank you clippy 2021-11-11 09:56:43 -05:00
Marco Neumann 3667cb36fa refactor: align HTTP error handling w/ cloud 2
Streamline HTTP error by using the same representation as cloud 2. Also
ensure that only internal server errors result in an error-level log
entry.

Fixes #3075.
2021-11-11 14:48:50 +01:00
Raphael Taylor-Davies 6f268f8260
refactor: extract DML types (#2731) (#3084)
* refactor: extract DML types (#2731)

* chore: fmt
2021-11-11 12:34:07 +00:00
Marco Neumann f0136e9791 ci: run clippy for all features
This indeed fixes some issues in our object store implementation.

Closes #537.
2021-11-11 10:48:21 +01:00
Carol (Nichols || Goulding) 7e13cb77ac
feat: add transactions for context to database owner info on disown 2021-11-10 16:49:32 -05:00
Carol (Nichols || Goulding) fb7bde527f
feat: Implement disown in Server and Database 2021-11-10 16:49:32 -05:00
Carol (Nichols || Goulding) 489fad0040
feat: Add disown database to the gRPC API 2021-11-10 16:49:31 -05:00
Carol (Nichols || Goulding) b1e81186d3
feat: Add disown database commands to the database CLI 2021-11-10 16:49:31 -05:00
Carol (Nichols || Goulding) 81e5c33a72
fix: Make error handling match a bit nicer to read and more consistent 2021-11-10 16:49:31 -05:00
Carol (Nichols || Goulding) bebb95830a
fix: Make create database CLI output consistent with delete database CLI output 2021-11-10 16:49:31 -05:00
Marco Neumann c80088bf12 feat: HTTP write interface for router 2021-11-10 17:55:46 +01:00
Marco Neumann 721011ab51 docs: improve wording
Co-authored-by: Andrew Lamb <alamb@influxdata.com>
2021-11-09 13:11:32 +01:00
Marco Neumann 00b3282180 refactor: partially split up HTTP implementation and tests
This should make it easier to to wire up the HTTP write interface for
the router. No functional change intended, this just moves code around.
2021-11-09 12:22:31 +01:00
Marco Neumann 83dbfe1333 feat: gRPC PB-write interface for new router 2021-11-08 15:49:13 +01:00
Marco Neumann b226d629c1 feat: router write logic 2021-11-08 14:09:33 +01:00
dependabot[bot] e4d943d79c
chore(deps): bump comfy-table from 4.1.1 to 5.0.0
Bumps [comfy-table](https://github.com/nukesor/comfy-table) from 4.1.1 to 5.0.0.
- [Release notes](https://github.com/nukesor/comfy-table/releases)
- [Changelog](https://github.com/Nukesor/comfy-table/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nukesor/comfy-table/compare/v4.1.1...v5.0.0)

---
updated-dependencies:
- dependency-name: comfy-table
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-08 10:55:57 +00:00
dependabot[bot] 7214fa9d6a
chore(deps): bump serde_json from 1.0.68 to 1.0.69
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.68 to 1.0.69.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.68...v1.0.69)

---
updated-dependencies:
- dependency-name: serde_json
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-08 10:31:33 +00:00
Raphael Taylor-Davies 60f0deaf1e
feat: remove flatbuffer entry (#3045) 2021-11-05 20:19:24 +00:00
Jake Goulding de672b7599 fix: Store the restore database UUID as bytes instead of as a string 2021-11-05 15:20:18 -04:00
Raphael Taylor-Davies 7d070f8582
feat: remove influxdata.iox.write.v1.WriteService (#3044)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-11-05 17:51:01 +00:00
Raphael Taylor-Davies 88868e7496
feat: remove legacy write service from influxdb_iox_client (#3043)
* feat: remove legacy write service from influxdb_iox_client

* chore: review feedback

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-11-05 17:26:18 +00:00
Carol (Nichols || Goulding) c8d80e5c28
fix: Change database paths to be under /dbs/ instead of under /[server id]/ 2021-11-05 10:14:06 -04:00
Raphael Taylor-Davies 898567e221
feat: migrate server to DbWrite (#2724) (#3035)
* feat: migrate server to DbWrite (#2724)

* chore: print perf log output

* fix: don't suppress CI status code

* chore: review feedback

* fix: don't error on empty line protocol write payloads

* fix: test

* fix: test
2021-11-05 11:09:33 +00:00
Raphael Taylor-Davies 06dfdc4af8
feat: simplify sharding (#3031)
* feat: simplify sharding

* chore: fix lint
2021-11-04 16:57:19 +00:00
Marco Neumann 78101eb52d feat: implement `RemoteService` for new router mode 2021-11-04 15:35:05 +01:00
kodiakhq[bot] 53422dbd48
Merge branch 'main' into crepererum/router_mode_get_set_cfg 2021-11-04 14:06:44 +00:00
Raphael Taylor-Davies d28749bd93
refactor: remove Entry from Db interfaces (#2724) (#3027) 2021-11-04 13:28:47 +00:00
Marco Neumann 4840dc11cb feat: add basic CRUD operations for router configs 2021-11-04 12:03:14 +01:00
Raphael Taylor-Davies 07ba629e2b
feat: migrate write buffer producer to MutableBatch and pbdata (#2743) (#3021)
* feat: migrate write buffer producer to MutableBatch and pbdata (#2743)

* fix: Kafka message content type header

* chore: fix doc
2021-11-04 10:20:40 +00:00
Carol (Nichols || Goulding) 0f62bb1686
fix: Distinguish between restoring twice and name collisions on restore
And return them in the correct situations.
2021-11-03 15:02:22 -04:00
Carol (Nichols || Goulding) 6615001dc7
fix: Extract loading the database name out of the rules file into a function 2021-11-03 15:02:21 -04:00
Carol (Nichols || Goulding) 52d9df5caf
fix: Thread a Not Found error on restore database through all APIs 2021-11-03 15:02:21 -04:00
Carol (Nichols || Goulding) ac75be6b78
fix: Don't require name for database restore CLI; it's now unused 2021-11-03 15:02:21 -04:00
Carol (Nichols || Goulding) 3e44f17698
fix: Return a useful error on attempt to restore an active database 2021-11-03 15:02:18 -04:00
Carol (Nichols || Goulding) f6327b1940
fix: Send back the correct error when attempting to restore the same database twice 2021-11-03 15:01:56 -04:00
Carol (Nichols || Goulding) a0b4b6b8f9
test: Add assertions that ensure UUID doesn't change when DatabaseRules are updated 2021-11-03 15:01:27 -04:00
Carol (Nichols || Goulding) 207d701bdb
fix: Have DatabaseState keep track of the UUID after reading it from object storage 2021-11-03 15:01:27 -04:00
Carol (Nichols || Goulding) 62e7376394
fix: Restore database should only need UUID, not database name too 2021-11-03 15:01:26 -04:00
Marco Neumann e3e99c45cf fix: remove stale comment 2021-11-03 16:35:54 +01:00
Marco Neumann 1cf697f235 refactor: make server fixture creation less confusing 2021-11-03 16:34:51 +01:00
Marco Neumann a91e572b43 feat: implement basic router server type
This only implements the deployment service and nothing else yet.
2021-11-03 16:34:51 +01:00
Raphael Taylor-Davies 39a7f3069f
feat: add alternative string encodings to pbdata (#2724) (#3006)
* feat: add alternative string encodings to pbdata (#2724)

* chore: review feedback

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-11-02 18:14:34 +00:00
Marco Neumann 0d0c0cb42b refactor: move write buffer configs to new home
Write buffer configs will partially be shared by database and router
nodes, so lets move them into a shared home.
2021-11-02 10:17:01 +01:00
Marco Neumann 011af2d6ba feat: add `DeploymentService`
Ref #2980.
2021-11-01 17:55:40 +01:00
kodiakhq[bot] 8c3446ac87
Merge branch 'main' into crepererum/issue2980b 2021-11-01 16:39:32 +00:00
Raphael Taylor-Davies f1a6468e7b
feat: migrate write buffer consumer to use DbWrite (#2724) (#3003)
* feat: migrate write buffer consumer to use DbWrite (#2724)

* fix: doc

* chore: fmt

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-11-01 16:38:48 +00:00
dependabot[bot] 1b377f0377
chore(deps): bump tokio-stream from 0.1.7 to 0.1.8
Bumps [tokio-stream](https://github.com/tokio-rs/tokio) from 0.1.7 to 0.1.8.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-stream-0.1.7...tokio-stream-0.1.8)

---
updated-dependencies:
- dependency-name: tokio-stream
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-01 11:38:59 +00:00
kodiakhq[bot] c724bb2ee8
Merge branch 'main' into dependabot/cargo/tokio-1.13.0 2021-11-01 11:30:33 +00:00
dependabot[bot] c540b40f05
chore(deps): bump tokio from 1.12.0 to 1.13.0
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.12.0 to 1.13.0.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.12.0...tokio-1.13.0)

---
updated-dependencies:
- dependency-name: tokio
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-01 11:21:59 +00:00
Marco Neumann bcd66c555a feat: add `RemoteService`
Ref #2980.
2021-11-01 11:38:46 +01:00
dependabot[bot] a1f978e280
chore(deps): bump tokio-util from 0.6.8 to 0.6.9
Bumps [tokio-util](https://github.com/tokio-rs/tokio) from 0.6.8 to 0.6.9.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-util-0.6.8...tokio-util-0.6.9)

---
updated-dependencies:
- dependency-name: tokio-util
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-01 01:28:41 +00:00
kodiakhq[bot] fc25e313c6
Merge branch 'main' into cn/iox-obj-sto-refactors 2021-10-29 13:53:26 +00:00
Carol (Nichols || Goulding) c02e476175
fix: Split database name from rules at the last possible function
When updating database rules, the database name should come from the
rules. Enforce this by only taking the rules as a parameter, rather than
having two arguments that could possibly disagree with each other.
2021-10-29 09:46:23 -04:00
Carol (Nichols || Goulding) f3edda11e7
fix: Print all delete database output to stdout 2021-10-29 09:46:02 -04:00
Marco Neumann 83e4514a43 feat: add `DeleteService`
Ref #2980.
2021-10-29 11:57:31 +02:00
kodiakhq[bot] 2caed5456e
Merge branch 'main' into crepererum/run_modes_boilerplate3 2021-10-29 07:06:12 +00:00
Marco Neumann 7b938fa521
docs: extend `CommonServerState` docs
Co-authored-by: Andrew Lamb <alamb@influxdata.com>
2021-10-29 09:05:29 +02:00
Marco Neumann f340738aa5 docs: explain `influxdb_ioxd::main` 2021-10-29 09:04:39 +02:00
Marco Neumann 3c22d93e38 fix: remove TODO error handling 2021-10-29 08:59:04 +02:00
Raphael Taylor-Davies 8a2410e161
feat: mutable batch write entry (#2724) (#2973)
* feat: mutable batch write entry (#2724)

* chore: lint

* chore: review feedback

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-10-28 20:15:28 +00:00
Carol (Nichols || Goulding) 088cdd8f97
fix: Share comfy_table style and give it a more descriptive name and docs 2021-10-28 16:00:58 -04:00
Carol (Nichols || Goulding) 0bccd35f8c
fix: List details about databases only prints active dbs and their UUIDs
We can no longer list deleted databases because the server no longer
knows about them, and we now have UUIDs that are useful to know about,
so change the detailed listing of databases to return UUID instead of
possible deleted at time.
2021-10-28 13:20:29 -04:00
Carol (Nichols || Goulding) ce55cf401c
feat: Return UUID when creating a database
Seems polite and is useful for some test setup
2021-10-28 13:20:29 -04:00
Carol (Nichols || Goulding) 4077d3a20a
fix: Take a UUID when restoring a database 2021-10-28 13:20:29 -04:00
Carol (Nichols || Goulding) 95ba84edca
fix: Return UUID when a database is deleted
So that it can be immediately used to restore elsewhere.
2021-10-28 13:20:29 -04:00
Carol (Nichols || Goulding) e80b902d15
test: Delete tests either irrelevant or covered elsewhere
Now that the database paths use UUIDs instead of names+generation ids,
and that IoxObjectStore checks there are no files in a directory before
it'll create a database directory (and has tests for that).
2021-10-28 13:20:28 -04:00
Carol (Nichols || Goulding) 09ad30cbfd
fix: For dumping a db catalog, look up db location in server config first
Rather than requiring the user of this command to know the database UUID
or otherwise having the knowledge of how to construct a database object
store location in this debugging command.
2021-10-28 13:20:28 -04:00
Carol (Nichols || Goulding) f160712f5e
fix: Remove the concept of generations
From iox_object_store and everywhere that fails to compile as a result.

Also make path handling in iox_object_store a bit more consistent.
2021-10-28 13:20:28 -04:00
Carol (Nichols || Goulding) 8198c1ff2a
refactor: Rename IoxObjectStore constructors to better match what server does with Databases 2021-10-28 13:20:27 -04:00
Marco Neumann 641c7b3051 refactor: make `influxdb_ioxd` server-type-generic 2021-10-28 17:38:06 +02:00
Marco Neumann 9996cfc6b3 fix: things I forgot to rename 2021-10-28 16:33:03 +02:00
Marco Neumann 9cd3dfb624 refactor: make gRPC server code reusable
Sadly `tonic` is a bit of a type nightmare (see
<23c1392fb7/tonic/src/transport/server/mod.rs (L452-L470)>
). So I wasn't able to pull into a simple "add all your
services"-function. Instead the server type now builds its own gRPC
server but relies on some helper macros to for common functionality.
2021-10-28 13:19:24 +02:00
Marco Neumann a6e0a069cc refactor: rename "run mode" to "server type" 2021-10-28 11:16:41 +02:00
Marco Neumann 843551d291 docs: improve
Co-authored-by: Andrew Lamb <alamb@influxdata.com>
2021-10-28 11:16:41 +02:00
Marco Neumann c465d0af8f refactor: abstract HTTP inteface for different run modes
First iteration of a common interface for the different server run
modes. This splits the existing HTTP server into a part that can be used
by all run modes (e.g. health checks, metrics endpoint, profiling) and a
part that is specific to the the database run mode.

Note that the interface is not final and might require more iterations,
but we have to start somewhere.
2021-10-28 11:16:41 +02:00
kodiakhq[bot] 6ebca13ed7
Merge branch 'main' into crepererum/prepare_run_mode_cli 2021-10-27 11:04:07 +00:00
Marko Mikulicic cdc0c63cb7
feat: Add LP batch size histogram metric
Part of #2752
2021-10-27 12:14:48 +02:00
Marco Neumann 6e29cec502 refactor: rename `query` mode to `database` 2021-10-27 09:31:46 +02:00
Marco Neumann 41bc373fe8 refactor: offer different modes via "run" CLI
Running a server is now using `influxdb_iox run MODE [args]`, e.g.
`influxdb_iox run query --server-id 1`. Another mode that will follow
soon is `router`.

The old syntax `influxdb_iox run [args]` (w/o the mode part) is still
supported but a deprecation note will be printed.
2021-10-27 09:31:46 +02:00
Marco Neumann a0cdca7781 chore: move `influxdb_iox` into a proper workspace package 2021-10-26 11:02:33 +02:00