Commit Graph

3668 Commits (bd22dd38eae97c65a910835bc33fbf8841026d72)

Author SHA1 Message Date
Marco Neumann bd22dd38ea docs: fix typos
Co-authored-by: Andrew Lamb <alamb@influxdata.com>
2021-07-08 09:18:09 +02:00
Marco Neumann b528ac2b55 feat: store schemas per table
This way we can:

- check for schema matches even for writes going into different
  partitions
- solve #1768 and #1884 in some future PR

Closes #1897.
2021-07-08 09:18:09 +02:00
Marco Neumann 5ca9760c94 test: make partioning in DB tests consistent w/ DB rules 2021-07-08 09:18:09 +02:00
Marco Neumann ed3ebdcbd2 refactor: use sync locks w/ better metrics 2021-07-08 09:18:09 +02:00
Marco Neumann 5936452895 feat: add infra to check table-wide schemas 2021-07-08 09:18:09 +02:00
Marco Neumann 315217362f feat: add TableBatch -> Schema conversion 2021-07-08 09:18:09 +02:00
kodiakhq[bot] 4e5d5c8c4c
Merge pull request #1924 from influxdata/pd-fix-last-write
fix: don't update last write time on failed writes
2021-07-07 19:07:37 +00:00
Paul Dix cc350bb1ea fix: don't update last write time on failed writes
Fixes #1905
2021-07-07 14:50:03 -04:00
kodiakhq[bot] ac1c7a5e07
Merge pull request #1923 from influxdata/cn/one-more-fb-fix
fix: Outdated reference to a moved file in docs
2021-07-07 18:11:47 +00:00
kodiakhq[bot] 94f32e357f
Merge branch 'main' into cn/one-more-fb-fix 2021-07-07 18:02:39 +00:00
Andrew Lamb e6d995cbd8
chore: Update to Rust 1.53.0 (#1922)
* chore: Update to Rust 1.53.0

* fix: Update to latest clippy standards

* fix: bad refactor

* fix: Update escaping

* test: update test output

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-07-07 18:02:03 +00:00
Carol (Nichols || Goulding) 479b15c2a3 fix: Outdated reference to a moved file in docs 2021-07-07 13:55:35 -04:00
Andrew Lamb 090b0aba11
refactor: remove unused `mutable_size_threshold` lifecycle setting (#1909)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-07-07 17:03:15 +00:00
Andrew Lamb d4f4af9068
fix: fix flatbuffers regeneration code (#1898)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-07-07 14:42:47 +00:00
Andrew Lamb 957c6245e3
docs: Note that rollover_partition is not automatically called (#1910)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-07-07 12:14:31 +00:00
Marko Mikulicic c63e2fe605
chore: Add debug logs to maybe_compact_chunks (#1911)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-07-07 12:06:26 +00:00
Marko Mikulicic 25e3a304ed
chore: Log partition rollover (#1907)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-07-07 11:48:16 +00:00
kodiakhq[bot] 3f0cd378f1
Merge pull request #1908 from influxdata/fixcanmove
chore: Add some more tests for can_move
2021-07-07 11:18:33 +00:00
Marko Mikulicic 17b82ebcd6
chore: Add some more tests for can_move 2021-07-07 13:03:38 +02:00
kodiakhq[bot] d075aaa0be
Merge pull request #1904 from influxdata/lifelogs
fix: Increase log level for important lifecycle events
2021-07-07 10:21:53 +00:00
Marko Mikulicic 41f49db3c1
fix: Increase log level for important lifecycle events
This can possibly help us better understand #1899.

The practical reason for increasing the log level for those
events is that we cannot currently ingest debug logs in our log aggregation system,
but it currently takes 7h to reproduce #1899 which means we don't have access to debug logs
from `kubectl logs` to help us troubleshoot.

That said, I do think that these logs are not debug logs but legit lifecycle information.
In particular if a log says "unexpected ..." I think it may be better regarded as an error/warning.
(If it becomes too verbose, it means its either a bug or not that unexpected).
2021-07-07 10:57:56 +02:00
kodiakhq[bot] a50c1e75e5
Merge pull request #1901 from influxdata/crepererum/builder_pattern_fix
refactor: rework builder pattern
2021-07-07 07:23:32 +00:00
Marco Neumann b6185982f7 refactor: make `ProviderBuilder` a build-time-checked builder
It's safer and also avoids cloning / copying state around.
2021-07-06 18:20:05 +02:00
Marco Neumann 4172d7946c refactor: make `SchemaMerger` self-consuming
The error handling in `merge` was incomplete, aka it could leave the
merger in a half-modified state in case of an error. That's generally a
bad idea and can lead to ugly bugs. Also the "builder" pattern that is
used here usually consumes itself (and provides a clone impl), so it is
easier to reason about modifications. So this commit just changes it to
self-consuming builder.

A nice side effect of the new pattern is also that it is build-time
checked and does not contain a runtime assert any longer.
2021-07-06 18:20:05 +02:00
Marco Neumann 4f5fe62428
feat: add DB name to lifecycle logs (#1900)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-07-06 16:14:28 +00:00
kodiakhq[bot] c7e3f05f76
Merge pull request #1895 from influxdata/crepererum/catalog_replay2
feat: add `Replay` state to DB init
2021-07-06 15:55:19 +00:00
kodiakhq[bot] 004ce63ec5
Merge branch 'main' into crepererum/catalog_replay2 2021-07-06 15:47:05 +00:00
Marco Neumann 09b7405b20
docs: spelling fixes
Co-authored-by: Andrew Lamb <alamb@influxdata.com>
2021-07-06 17:46:36 +02:00
kodiakhq[bot] 27d9bf4b2d
Merge pull request #1896 from influxdata/crepererum/issue1874
fix: `persist_row_threshold` limits the out chunk row count
2021-07-06 15:19:21 +00:00
Marco Neumann f45679183c chore: use saturating sub instead of simple sub 2021-07-06 16:41:36 +02:00
Marco Neumann 677314f52f fix: `persist_row_threshold` limits the out chunk row count
`persist_row_threshold` should limit the rows of the post-compaction
output chunk (and hence the sum of rows over the input chunks), not
the number of rows of each individual input chunk.

Fixes #1874.
2021-07-06 15:17:56 +02:00
kodiakhq[bot] 76d2c317a5
Merge pull request #1866 from influxdata/er/fix/read_buffer/predicate
fix: ensure no rows returned for predicates with disjoint matching expressions
2021-07-06 12:42:06 +00:00
Edd Robinson 2ec9151b32
Merge branch 'main' into er/fix/read_buffer/predicate 2021-07-06 13:35:04 +01:00
Marco Neumann 3d644b63a1 feat: add `Replay` state to DB init 2021-07-06 14:24:39 +02:00
kodiakhq[bot] 246a07f884
Merge pull request #1893 from influxdata/crepererum/fix_query_tests_rebuild
test: don't rebuild `query_tests` all the time
2021-07-05 13:37:30 +00:00
Marco Neumann 8387eaed27 test: do not recompile `query_tests` when test content changes
There is no need to recompile the entire `query_tests` crate when the
CONTENT (not the SET) of the test cases changes, e.g. due to new
optimizations, datafusion upgrades, query additions, etc. We now check
if `cases.rs` really changed before touching it, so that Cargo can rely
on the files mtime.
2021-07-05 15:30:10 +02:00
Marco Neumann d6cff911b6 test: ensure that query tests don't rebuild all the time
Beforehand:

```text
❯ env CARGO_LOG=cargo::core::compiler::fingerprint=info cargo test -p query_tests
[2021-07-05T08:52:13Z INFO  cargo::core::compiler::fingerprint] stale: changed "/home/mneumann/src/influxdb_iox/query_tests/cases"
[2021-07-05T08:52:13Z INFO  cargo::core::compiler::fingerprint]           (vs) "/home/mneumann/src/influxdb_iox/target/debug/build/query_tests-0e8f741dfb84437f/output"
[2021-07-05T08:52:13Z INFO  cargo::core::compiler::fingerprint]                FileTime { seconds: 1625474716, nanos: 436081357 } != FileTime { seconds: 1625474752, nanos: 52625167 }
[2021-07-05T08:52:13Z INFO  cargo::core::compiler::fingerprint] fingerprint error for query_tests v0.1.0 (/home/mneumann/src/influxdb_iox/query_tests)/Test/TargetInner { ..: lib_target("query_tests", ["lib"], "/home/mneumann/src/influxdb_iox/query_tests/src/lib.rs", Edition2018) }
[2021-07-05T08:52:13Z INFO  cargo::core::compiler::fingerprint]     err: current filesystem status shows we're outdated
[2021-07-05T08:52:13Z INFO  cargo::core::compiler::fingerprint] fingerprint error for query_tests v0.1.0 (/home/mneumann/src/influxdb_iox/query_tests)/RunCustomBuild/TargetInner { ..: custom_build_target("build-script-build", "/home/mneumann/src/influxdb_iox/query_tests/build.rs", Edition2018) }
[2021-07-05T08:52:13Z INFO  cargo::core::compiler::fingerprint]     err: current filesystem status shows we're outdated
[2021-07-05T08:52:13Z INFO  cargo::core::compiler::fingerprint] fingerprint error for query_tests v0.1.0 (/home/mneumann/src/influxdb_iox/query_tests)/Build/TargetInner { ..: lib_target("query_tests", ["lib"], "/home/mneumann/src/influxdb_iox/query_tests/src/lib.rs", Edition2018) }
[2021-07-05T08:52:13Z INFO  cargo::core::compiler::fingerprint]     err: current filesystem status shows we're outdated
   Compiling query_tests v0.1.0 (/home/mneumann/src/influxdb_iox/query_tests)
```

The issue is that both the input and the test output files are located
under `cases/`. `build.rs` used `cargo:rerun-if-changed=cases` which per
Cargo doc will scan ALL files in that directory. Note that the normal
`exclude` directive in `Cargo.toml` does NOT work, see
https://github.com/rust-lang/cargo/issues/4587 .

So we need to split input and output files into separate directories
(`cases/{in,out}`).
2021-07-05 15:30:10 +02:00
kodiakhq[bot] 403a2cdde4
Merge pull request #1892 from influxdata/crepererum/move_persistence_windows_code
chore: move persistence windows related code into own crate
2021-07-05 13:28:22 +00:00
Marco Neumann 4ca2d3e148 chore: move persistence windows related code into own crate
The entire persistence windows data structures (including the
checkpoints) have nothing to do with the mutable buffer per se. So lets
move them into their own crate. This also makes `parquet_file` not
longer depend on `mutable_buffer`.
2021-07-05 10:23:58 +02:00
kodiakhq[bot] 060689b050
Merge pull request #1872 from influxdata/crepererum/ckpt_in_parquet
feat: persist part+db checkpoint in parquets and catalog
2021-07-05 07:49:15 +00:00
Marco Neumann d96e15c3f7 docs: explain why we store checkpoints in parquet files 2021-07-05 09:42:46 +02:00
Marco Neumann cdab1bed05 feat: persist part+db checkpoint in parquets and catalog
This will be required for replay on server startup.
2021-07-05 09:42:46 +02:00
kodiakhq[bot] a35b334ee5
Merge pull request #1880 from influxdata/crepererum/db_state_in_grpc
feat: expose DB state in gRPC interface
2021-07-05 07:28:10 +00:00
kodiakhq[bot] bcf43a3de5
Merge branch 'main' into crepererum/db_state_in_grpc 2021-07-05 07:21:48 +00:00
Raphael Taylor-Davies 5fe49aa017
feat: add flush guard to PersistenceWindows (#1883)
* feat: add flush guard to PersistenceWindows

* docs: Update comments based on code review

* fix: fmt

Co-authored-by: Andrew Lamb <alamb@influxdata.com>
Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
2021-07-02 20:15:33 +00:00
Raphael Taylor-Davies b4534883fe
refactor: remove table name from upsert_table (#1882)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-07-02 15:22:41 +00:00
Marko Mikulicic fba64a41f5
docs: improve profiling docs (#1869)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-07-02 10:47:13 +00:00
Marco Neumann 54fbb60740 feat: expose DB state in gRPC interface 2021-07-02 11:24:36 +02:00
kodiakhq[bot] 8386b1528e
Merge pull request #1875 from influxdata/pd-remove-mb-size-limit-checks
feat: remove MUB size threshold
2021-07-01 20:08:20 +00:00
kodiakhq[bot] 404da38d6f
Merge branch 'main' into pd-remove-mb-size-limit-checks 2021-07-01 20:01:32 +00:00