Commit Graph

5940 Commits (d1c6f76a0ea1838faacf49b11bcb4ff9eaf1f85a)

Author SHA1 Message Date
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
Edd Robinson 6a54a91db6 docs: add alternative protoc build instructions 2021-11-11 12:19:11 +00:00
Edd Robinson fc7306c4f9 docs: add supported platforms 2021-11-11 12:06:56 +00:00
kodiakhq[bot] c0660aaa22
Merge pull request #3082 from influxdata/crepererum/issue537
ci: run clippy for all features
2021-11-11 09:55:53 +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
kodiakhq[bot] 2b0ffb28ad
Merge pull request #3077 from influxdata/crepererum/router_write_http_done
feat: HTTP write interface for new router
2021-11-11 08:29:28 +00: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) e160954b57
refactor: Extract functions for creating and updating owner info to match the fetching function 2021-11-10 16:49:31 -05:00
Carol (Nichols || Goulding) d42c890333
refactor: Extract a function for reading a database's owner file 2021-11-10 16:49:31 -05:00
Carol (Nichols || Goulding) d4d52de8b7
docs: Correct copypasta comment 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
Carol (Nichols || Goulding) 73897fc96a
docs: Add some missing descriptions to match other places 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 09239c4943 feat: improve testing interface for the `router` crate 2021-11-10 17:51:58 +01:00
Marco Neumann d24025a3c2 feat: add `TraceCollector::as_any` for easier testing 2021-11-10 17:51:58 +01:00
Raphael Taylor-Davies f650962221
refactor: merge CI integration tests (#3049)
* refactor: merge CI integration tests

* chore: update docs
2021-11-10 16:48:16 +00:00
Marco Neumann 16fc610433 chore: faster and smaller IOx binaries
Use `codegen-units = 1`, thin-LTO and debug section compression to make our binary smaller (which is good for deploy and
test times) and faster.

# Summary

The binary size of `influxdb_iox` after building with:

```console
$ cargo build --release --no-default-features --features="aws,gcp,azure,jemalloc_replacing_malloc"
```

The profile was:

```toml
[profile.release]
debug = true
```

The commit was:

```text
89ece8b493
```

The size results are:

| Method                                     | Size  |
| ------------------------------------------ | ----- |
| baseline                                   | 833MB |
| baseline + dbg compression                 | 222MB |
| baseline + strip                           |  49MB |
| codegen-units                              | 520MB |
| codegen-units + strip                      |  40MB |
| codegen-units + dbg compression            | 143MB |
| thin LTO                                   | 715MB |
| thin LTO + strip                           |  49MB |
| thin LTO + dbg compression                 | 199MB |
| codegen-units + thin LTO                   | 449MB |
| codegen-units + thin LTO + strip           |  40MB |
| codegen-units + thin LTO + dbg compression | 130MB |

For the methods that were successfully measured I couldn't really see any compile time differences on my laptop.

# Methods

## Strip
Remove debug symbols. We don't really want this, so this is just to get an idea of the size

```console
$ strip baseline
```

## Debug Sections compression
Debug sections make a large amount of our binary size (a stripped executable is 49MB instead of 833MB). Since we like to
have debug symbols we cannot just strip them. However these symbols are only used for:

- backtrace generation (something went wrong, not BAU)
- profiling
- debugging

So in normal operation and most test scenarios, we're just wasting memory. So we could compress them:

```console
$ objcopy --compress-debug-sections baseline baseline-dbg_compressed
```

There is also elfutils:

```console
$ eu-elfcompress test
```

Elfutils nearly ends up with the same size (220MB instead of 222MB that objcopy achieves), but takes more time and is
probably not worth it.

Note that compressed debug sections exist since many years. The Rust ecosystem supports reading them since over a year,
see:

- <https://github.com/gimli-rs/gimli/issues/195>
- <https://github.com/rust-lang/backtrace-rs/issues/342>

## Codegen Units
The rust compiler parallelizes codegen work. This split into units however means that optimizations are somewhat
limited. This can be change by:

```toml
[profile.release]
...
codegen-units = 1
```

As a nice side effect this should also make our code faster.

## Thin LTO
Get LLVM to run "thin" Link Time Optimization:

```toml
[profile.release]
...
lto = "thin"
```

As a nice side effect this should also make our code faster.

## Fat LTO
Get LLVM to run "fat" Link Time Optimization:

```toml
[profile.release]
...
lto = "fat"
```

There are no results for this because this took a massive amount of memory and CPU time and did not finish on my system.
2021-11-10 15:49:19 +01:00
kodiakhq[bot] a439404e82
Merge pull request #3079 from influxdata/crepererum/fix_docker
ci: fix usage of old docker version
2021-11-10 09:50:38 +00:00
Marco Neumann 89ece8b493 ci: fix usage of old docker version
`--all-tags` as introduced for version 20.10 but appearently we're
running an older version.
2021-11-10 10:27:16 +01:00
kodiakhq[bot] 7261648ed7
Merge pull request #3078 from influxdata/crepererum/docker_latest_tag
ci: also push `:main` tag in addition to SHA-based ones
2021-11-10 09:03:38 +00:00
Marco Neumann ae58ae9c81 ci: also push `:main` tag in addition to SHA-based ones 2021-11-10 09:06:19 +01:00
kodiakhq[bot] 86ea00f53c
Merge pull request #3072 from influxdata/jgm-github-devex
chore(github): new issue template for developer experience
2021-11-09 13:28:33 +00:00
kodiakhq[bot] 83635ea612
Merge branch 'main' into jgm-github-devex 2021-11-09 13:20:43 +00:00
kodiakhq[bot] 05084aa722
Merge pull request #3074 from influxdata/crepererum/router_write_http_prep
refactor: partially split up HTTP implementation and tests
2021-11-09 12:19:48 +00: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
kodiakhq[bot] 17ecec6d37
Merge pull request #3067 from influxdata/crepererum/router_write_grpc
feat: gRPC PB-write interface for new router
2021-11-09 08:27:18 +00:00
kodiakhq[bot] c18acdcbcd
Merge branch 'main' into crepererum/router_write_grpc 2021-11-09 08:20:00 +00:00
Jacob Marble a4dd8b8e15
chore(github): new issue template for developer experience
Just like it says
2021-11-08 15:58:30 -08:00
kodiakhq[bot] e00435bc55
Merge pull request #3052 from influxdata/cn/assert-error-macro
refactor: Extract a macro for matching errors in tests
2021-11-08 16:33:36 +00:00
Carol (Nichols || Goulding) 9c40bd87fb
feat: Stringify and print error pattern on assert_error failure 2021-11-08 11:14:23 -05:00
Carol (Nichols || Goulding) 3dda694520
refactor: Extract a macro for matching errors in tests 2021-11-08 11:14:23 -05:00
kodiakhq[bot] b0c23df30f
Merge pull request #3069 from influxdata/ntran/order_output
test: add group by tests
2021-11-08 15:55:46 +00:00
Nga Tran 71731524c4 test: add group by tests 2021-11-08 10:46:40 -05:00
Marco Neumann 83dbfe1333 feat: gRPC PB-write interface for new router 2021-11-08 15:49:13 +01:00
kodiakhq[bot] 6fdfaef72c
Merge pull request #3054 from influxdata/tran/rub_timestamp
fix: statistics for max/min(time) should have data type timstamp
2021-11-08 14:36:29 +00:00
kodiakhq[bot] 2e7cf8fb2b
Merge branch 'main' into tran/rub_timestamp 2021-11-08 14:29:11 +00:00
Nga Tran abbfafcabd chore: merge main to branch 2021-11-08 09:28:29 -05:00
Marco Neumann d0df1a14b4
ci: fix quay login for image promotion (#3066)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-11-08 14:17:36 +00:00
kodiakhq[bot] 36cc592336
Merge pull request #3042 from influxdata/crepererum/router_core_logic
feat: router core logic
2021-11-08 14:05:39 +00:00
kodiakhq[bot] 4a529837e9
Merge branch 'main' into crepererum/router_core_logic 2021-11-08 13:58:28 +00:00
Raphael Taylor-Davies 6320ce6f55
refactor: move delete predicate proto to own package (#2731) (#3065)
* refactor: move delete predicate proto to own package (#2731)

* chore: fmt

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-11-08 13:42:26 +00:00
kodiakhq[bot] 7277149bd1
Merge pull request #3064 from influxdata/crepererum/fix_get_deploy_tags
ci: fix `get-deploy-tags.sh`
2021-11-08 13:21:09 +00:00
Marco Neumann 6786fd5955 ci: fix `get-deploy-tags.sh` 2021-11-08 14:12:03 +01:00
Marco Neumann ea2604b7b6 docs: explain write sink test 2021-11-08 14:09:33 +01:00
Marco Neumann 4130d508c0 docs: document write buffer variants 2021-11-08 14:09:33 +01:00