Commit Graph

3297 Commits (f4693e36c065c065599141d12d452b73a4674321)

Author SHA1 Message Date
Carol (Nichols || Goulding) a63c12acfb fix: Remove references to Kafka from db tests 2021-06-07 10:58:34 -04:00
Carol (Nichols || Goulding) f4a6c0b4bb refactor: Actually, why not just store entry as-is within SequencedEntry 2021-06-07 09:56:23 -04:00
Carol (Nichols || Goulding) 45a3547978 refactor: Take ownership of Entry and transform into SequencedEntry
Rather than cloning the data. The Entry is no longer used after this
point.
2021-06-07 09:56:23 -04:00
Carol (Nichols || Goulding) 8ab8544d4a feat: Wire up a WriteBuffer trait implemented by a mock
With an unimplemented where the Kafka implementation will be.
2021-06-07 09:56:23 -04:00
Carol (Nichols || Goulding) 2418e91001 feat: Add a DatabaseRule field for an optional Kafka write buffer connection string 2021-06-07 09:56:23 -04:00
kodiakhq[bot] 0432e15dd0
Merge pull request #1562 from influxdata/cn/refactor-prep-for-kafka
refactor: Preparations for optional Kafka write buffer
2021-06-07 13:53:50 +00:00
Carol (Nichols || Goulding) b5fac8cd59 refactor: Rearrange database rule checks and SequencedEntry construction
There are going to be more cases here when the Kafka write buffer is
introduced that affect how the SequencedEntry is created and whether a
database being immutable is an error or not.
2021-06-07 09:37:22 -04:00
Carol (Nichols || Goulding) 7ff2c5c951 refactor: Rearrange reading of db rules and locking 2021-06-07 09:37:22 -04:00
Carol (Nichols || Goulding) 0139167c98 refactor: Extract a Sequence type
A sequencer id and sequence number should always go together, so convey
that with a type. Also, this removes lots of repetition of "sequence" 😅
2021-06-07 09:37:22 -04:00
kodiakhq[bot] 47c7c38131
Merge pull request #1511 from influxdata/cn/delete
fix: Delete all write-buffer related code
2021-06-07 13:37:05 +00:00
kodiakhq[bot] 87297f7db4
Merge branch 'main' into cn/delete 2021-06-07 13:32:42 +00:00
Raphael Taylor-Davies 1e7ef193a6
refactor: use field metadata to store influx types (#1642)
* refactor: use field metadata to store influx types

make SchemaBuilder non-consuming

* chore: remove unused variants

* chore: fix lints
2021-06-07 13:26:39 +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
Raphael Taylor-Davies afe88eeb7c
chore: fix flaky test (#1643) 2021-06-07 12:52:11 +00:00
kodiakhq[bot] d464c0754f
Merge pull request #1640 from influxdata/xlarge_perf_image
fix: give xlarge image to perf_image build step
2021-06-07 12:14:52 +00:00
Marko Mikulicic 05e35537d8
fix: give xlarge image to perf_image build step 2021-06-07 14:03:55 +02:00
Andrew Lamb 05c2d6d3b6
docs: add a comment w/ rationale for LineWriter (#1638)
* docs: add a comment w/ rationale for LineWriter

* fix: add link
2021-06-07 10:41:54 +00:00
kodiakhq[bot] 1acd4ea8bd
Merge pull request #1637 from influxdata/logsdebug
fix: Fix garbled log lines
2021-06-07 10:27:26 +00:00
kodiakhq[bot] 09c98cc5bd
Merge branch 'main' into logsdebug 2021-06-07 10:22:26 +00:00
kodiakhq[bot] 7da49b47b7
Merge pull request #1635 from influxdata/ntran/dedup3
feat: full foundation for deduplicate with todo functions to finish
2021-06-07 10:18:55 +00:00
Marko Mikulicic 6fb8e8bc9f
fix: Fix garbled log lines
Closes #1615

w.r.t testing, ETOOMANYYAKS:
this is not easy to test as it involves non determinism to reproduce the issue.

I tested it manually by comparing,,

before:

```console
$ LOG_FORMAT=logfmt LOG_FILTER=debug ./target/debug/influxdb_iox run \
  | awk -F 'level=' '{print (NF?NF-1:0)}' \
  | sort | uniq -c
11543 0
12193 1
1116 2
 150 3
  25 4
   8 5
   3 6
   1 7
```

after:

```console
$ LOG_FORMAT=logfmt LOG_FILTER=debug ./target/debug/influxdb_iox run \
  | awk -F 'level=' '{print (NF?NF-1:0)}' \
  | sort | uniq -c
14029 1
```
2021-06-07 11:56:51 +02:00
Nga Tran ff641e5638 refactor: address Andrew's comments 2021-06-06 22:36:44 -04:00
Nga Tran 2f82a9d670 feat: full foundation for deduplicate with todo functions to finish 2021-06-06 22:09:01 -04:00
Carol (Nichols || Goulding) 4d6569583e fix: Partially restore SequencedEntry as Entry+sequencer_id+sequence_num 2021-06-04 14:40:19 -04: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 4f81573f5f
docs: add query for computing time ranges to cookbook (#1620)
* docs: add query for computing time ranges to cookbook

* fix: add note about nanosecond conversion

* fix: Update docs/sql.md

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-06-04 14:59:05 +00:00
kodiakhq[bot] 80ca340828
Merge pull request #1626 from influxdata/lesserror
fix: Revert Add more details to WritePoints error log
2021-06-04 14:51:23 +00:00
Marko Mikulicic c2263c4acb
fix: Revert Add more details to WritePoints error log
This reverts commit 293433a73e.

We have some of that now as debug logs and we'll soon have other info in trace logs.
The error message in itself is the wrong place to put this info; it has been added here
just as a hack and hacks must be cleaned up.
2021-06-04 15:17:02 +02:00
Andrew Lamb ff3215e6a9
feat: Implement Chunk Pruning (#1567) 2021-06-04 13:05:22 +00:00
kodiakhq[bot] 9e50799dac
Merge pull request #1625 from influxdata/logfmts
feat: Add logfmts script to humanize timestamps
2021-06-04 12:22:47 +00:00
kodiakhq[bot] 3747071387
Merge branch 'main' into logfmts 2021-06-04 12:18:25 +00:00
Marko Mikulicic 12b561f140
feat: Add logfmts script to humanize timestamps
```console
$ kubectl logs deploy/iox-router-1000 -c iox -f | TZ=UTC ./scripts/logfmts
2021-06-04 10:25:46 level=debug msg="Successfully processed request" response="Response { status: 204, version: HTTP/1.1, headers: {\"x-powered-by\": \"Routerify v2.0.0-beta-2\"}, body: Body(Empty) }" target="influxdb_iox::influxdb_ioxd::http" location="src/influxdb_ioxd/http.rs:359"
```
2021-06-04 14:16:43 +02:00
Marco Neumann c4a2a7243f fix: formatting 2021-06-04 12:58:25 +02:00
Marco Neumann 86a80f4835 feat: check for server errors in CLI 2021-06-04 12:58:18 +02:00
Marco Neumann 195644da04 docs: document semaphore design in server 2021-06-04 12:52:13 +02:00
kodiakhq[bot] 21c7bff213
Merge pull request #1621 from influxdata/crepererum/limit_cleanup_amount
feat: limit number of files during storage cleanup
2021-06-04 10:51:45 +00:00
kodiakhq[bot] 402ef0ebde
Merge branch 'main' into crepererum/limit_cleanup_amount 2021-06-04 10:47:33 +00:00
Marco Neumann 34939e37c7
fix: style
Co-authored-by: Marko Mikulicic <mkm@influxdata.com>
2021-06-04 12:46:28 +02:00
Marco Neumann f38a6378a6 fix: make `getServerStatus` gRPC-compliant 2021-06-04 12:00:49 +02:00
Marco Neumann e06d65bb2a refactor: migrate "DBs initialized" RPC to "server status" 2021-06-04 11:33:41 +02:00
Marco Neumann e876eed8c4 fix: grammar
Co-authored-by: Andrew Lamb <alamb@influxdata.com>
2021-06-04 11:33:41 +02:00
Marco Neumann b30d7e2821 feat: move DB loading into background worker
Before this change we loaded databases eagerly when a serverID was
passed on startup BEFORE starting up the gRPC server. Since loading
(esp. at its current state without checkpoints and with too many small
parquet files) can take very long, K8s thinks IOx is unhealthy. With
this change we are now loading databases in the server background worker
once a serverID is available. Until then we block all DB-related
interactions including adding new databases (since without inspecting
the object store there is now way we can check if the DB already
exists).

Furthermore we now load database no matter if the serverID was passed on
startup (via CLI or environment variable) or was set later via gRPC
call. Before this change the latter case was somewhat forgotten.
2021-06-04 11:33:41 +02:00
Marco Neumann c830542464 feat: add info log when cleanup limit is reached 2021-06-04 11:12:29 +02:00
kodiakhq[bot] c595757616
Merge pull request #1622 from influxdata/fixlogfmt2
fix: Fix logfmt escaping
2021-06-04 07:11:04 +00:00
Marko Mikulicic 961c981d31
fix: Fix logfmt escaping
Closes #1252

I defer to #1252 for the wider context; the "why" this escaping rule is the likely the right one (the "official" logfmt is particularly light on the spec side)

This PR, implements the following interpretation of the escaping rules:

1. To put a double quote in a double quoted string, you need to escape the double quote with a backslash: `"` -> `"\""`.
2. To put a backslash in a double quoted string, you need to escape the backslash with another backslash: `\` -> `"\\"`.
3. To put a character sequence `\"` inside a double quoted string, you need to combine the previous two rules: `\"` -> `"\\\""`

These rules are quite reasonable and follow the escape rules of most languages.

The test strings are correctly parsed by https://github.com/brandur/hutils,
2021-06-04 02:10:24 +02:00
pierwill f349cfb64f
ci: verify gpg signatures of dependencies in CI (#1609)
* ci: verify gpg signatures of dependencies in CI

Verify signatures of bazel and influxdb2.

* fix: harden curl in Dockerfile.ci

Co-authored-by: pierwill <pierwill@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-06-03 16:20:50 +00:00
Raphael Taylor-Davies 696ebdc4db
feat: recover failed lifecycle actions (#1099) (#1592)
* feat: recover failed lifecycle actions (#1099)

* chore: review feedback

* chore: fix logical conflicts
2021-06-03 15:46:33 +00:00
Marco Neumann 91df8a30e7 feat: limit number of files during storage cleanup
Since the number of parquet files can potentially be unbound (aka very
very large) and we do not want to hold the transaction lock for too
long and also want to limit memory consumption of the cleanup routine,
let's limit the number of files that we collect for cleanup.
2021-06-03 17:43:11 +02:00
kodiakhq[bot] 5037f5e23c
Merge pull request #1619 from influxdata/debuginfo2
feat: Preserve full debug infos in release builds
2021-06-03 14:04:23 +00:00