Commit Graph

3732 Commits (1a79bf7e99fed4ebe20338c650830d7b9ad279cf)

Author SHA1 Message Date
Andrew Lamb f670224ea1
chore: Reduce output spew during query tests (#1926)
* chore: Reduce output spew during query tests

* docs: Update query_tests/src/runner.rs

Co-authored-by: Edd Robinson <me@edd.io>

Co-authored-by: Edd Robinson <me@edd.io>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-07-08 11:06:24 +00:00
Andrew Lamb 7602bde850
chore: Update datafusion deps (#1799)
* chore: Update datafusion deps + rework code

* refactor: remove workaround as it has been contributed upstream

* fix: Update query/src/exec/split.rs

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-07-08 10:58:32 +00:00
kodiakhq[bot] 7b18c29d32
Merge pull request #1915 from influxdata/fixnonelinger
fix: Ensure mutable_linger_seconds can not be None
2021-07-08 09:33:15 +00:00
Marko Mikulicic 7059f16b9e
refactor: Turn mutable_linger_seconds into a non-optional (#1917) 2021-07-08 11:25:57 +02:00
Marko Mikulicic 0ec11eb907
fix: Handle None mutable_linger_seconds in can_move
This will be followed by a cleanup PR that will no longer make mutable_linger_seconds an option
and move the defaulting to the configuration layer.

Closes #1899
2021-07-08 11:02:09 +02:00
kodiakhq[bot] ea2bbab0f1
Merge pull request #1913 from influxdata/crepererum/issue1897
feat: store schemas per table, enforce schema on write
2021-07-08 08:08:59 +00:00
Marco Neumann 24056d7bfc test: ensure that table schemas are recovered from pres. catalog 2021-07-08 10:01:42 +02:00
Marco Neumann a746cd45c5 test: check for schema change errors 2021-07-08 09:51:49 +02:00
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
Nga Tran 5c722af0fa fix: remove comments 2021-07-07 16:50:53 -04:00
Nga Tran d3c4f8c249 fix: store sort key correctly inthe schema. Update tests to reflect it 2021-07-07 15:55:23 -04: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
Nga Tran 8dfc3bb6bc fix: Thanks Andrew for helping fic the compile problem and avoid using Arc<Mutex> 2021-07-06 18:05:59 -04:00
Nga Tran 8f172509b0 fix: remove redudant quote 2021-07-06 17:03:44 -04:00
Nga Tran 76789e5902 feat: store sotkey into the chunk schema of RUB 2021-07-06 17:00:35 -04: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