Marco Neumann
0b5552f131
refactor: ensure that DBs are reserved before doing expensive IO
2021-06-14 17:34:57 +02:00
Marco Neumann
233235365a
refactor: de-couple DB rules commit from name reservation
...
This allows us to put DBs in a controlled error state when we try to
load rules from a file but the rules are somewhat broken.
2021-06-14 17:34:57 +02:00
Marco Neumann
318af9b801
feat: keep error that occurred during server init
2021-06-14 17:34:57 +02:00
Marco Neumann
bf0ba6ba6c
test: rename some server init tests to better reflect their nature
2021-06-14 17:34:57 +02:00
Marco Neumann
250ccdcdcd
refactor: use `IOxMetadata` instead of path parsing for parquet chunks
2021-06-14 16:24:50 +02:00
Marco Neumann
d51e7a127c
feat: include table name, partition key, and chunk ID in `IoxMetadata`
2021-06-14 16:24:50 +02:00
Andrew Lamb
a14e9ab27c
refactor: rename mutable_buffer::Chunk --> mutable_buffer::MBChunk ( #1711 )
...
* refactor: rename mutable_buffer::Chunk --> mutable_buffer::MBChunk
* fix: fmt
2021-06-14 13:35:20 +00:00
Andrew Lamb
856751deec
feat: Lifecycle manager unloads, rather than drop, chunks when soft limit is hit ( #1701 )
...
* feat: unload chunks from memory rather than dropping them
* docs: Update server/src/db/lifecycle.rs
Co-authored-by: Marco Neumann <marco@crepererum.net>
* docs: Update comment wording
Co-authored-by: Marco Neumann <marco@crepererum.net>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-06-14 13:14:39 +00:00
kodiakhq[bot]
fc1b5ea165
Merge branch 'main' into crepererum/parquet_metadata_wrapper
2021-06-14 11:20:39 +00:00
Andrew Lamb
9d1ca95a52
refactor: Rename catalog::Chunk --> catalog::CatalogChunk ( #1702 )
...
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-06-14 11:20:14 +00:00
Marco Neumann
518f7c6f15
refactor: wrap upstream parquet MD into struct + clean up interface
...
This prevents users from `parquet_file::metadata` to also depend on
`parquet` directly. Furthermore they don't need to important dozend of
functions and can instead just use `IoxParquetMetaData` directly.
2021-06-14 13:17:01 +02:00
Marco Neumann
665919786e
test: fix test
2021-06-14 10:52:23 +02:00
Marco Neumann
f4693e36c0
refactor: `catalog_checkpoint_interval` => `catalog_transactions_until_checkpoint`
2021-06-14 10:34:32 +02:00
Marco Neumann
898c638630
feat: wire up catalog checkpointing
...
Closes #1381 .
2021-06-14 10:08:32 +02:00
Marco Neumann
df866f72e0
refactor: store parquet metadata in chunk
...
This will be useful for #1381 .
At the moment we parse schema and stats eagerly and store them alongside
the parquet metadata in memory. Technically this is not required since
this is basically duplicate data. In the future we might trade-off some
of this memory against CPU consumption by parsing schema and stats on
demand.
2021-06-14 10:08:31 +02:00
Edd Robinson
ff19beb0ad
refactor: export rb chunk as RBChunk
2021-06-11 18:33:10 +01:00
kodiakhq[bot]
71e2a8fbaa
Merge branch 'main' into crepererum/inline_parquet_table_struct
2021-06-11 11:22:48 +00:00
Andrew Lamb
0cbe74dbde
fix: persistence to parquet by swapping order of arguments ( #1687 )
...
* fix: fix order of arguments
* test: for persistence
2021-06-11 10:55:40 +00:00
Marco Neumann
f8a518bbed
refactor: inline `Table` into `parquet_file::chunk::Chunk`
...
Note that the resulting size estimations are different because we were
double-counting `Table`. `mem::size_of::<Self>()` is recursive for
non-boxed types since the child will be part of the parent structure.
Issue: #1295 .
2021-06-11 11:54:31 +02:00
Raphael Taylor-Davies
11b25b3aaf
refactor: swap order of partition and table in in-memory catalog ( #1678 )
...
* refactor: swap order of partition and table in in-memory catalog
* chore: review feedback
* chore: validate panic message
* chore: review feedback
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-06-10 16:40:30 +00:00
Marco Neumann
13bb290a7c
chore: enforce `clippy::future_not_send` for `server` + top-level crate ( #1679 )
...
* chore: enforce `clippy::future_not_send` for `server`
* chore: enforce `clippy::future_not_send` for top-level crate
2021-06-10 15:01:12 +00:00
Marco Neumann
294c304491
feat: impl catalog checkpointing infrastructure
...
This implements a way to add checkpoints to the preserved catalog and
speed up replay.
Note: This leaves the "hook it up into the actual DB" for a future PR.
Issue: #1381 .
2021-06-10 15:42:21 +02:00
kodiakhq[bot]
3ba27bdbd9
Merge branch 'main' into crepererum/clippy_future_not_send_part1
2021-06-10 07:19:31 +00:00
kodiakhq[bot]
5f863a59fd
Merge branch 'main' into crepererum/extract_server_init
2021-06-10 07:14:57 +00:00
kodiakhq[bot]
44d8fb9472
Merge branch 'main' into crepererum/clippy_future_not_send_part1
2021-06-10 07:10:11 +00:00
kodiakhq[bot]
eed73a30c5
Merge branch 'main' into ntran/dedup_within_chunk
2021-06-09 18:19:17 +00:00
Nga Tran
c1c58018fc
refactor: address review comments
2021-06-09 14:17:47 -04:00
Marco Neumann
4fe2d7af9c
chore: enforce `clippy::future_not_send` for `parquet_file`
2021-06-09 18:18:27 +02:00
Marco Neumann
d9c38dfe88
refactor: extract server init code
...
This prepares for #1624 , so the end results looks a bit cleaner.
2021-06-09 16:53:11 +02:00
kodiakhq[bot]
b49abf9b02
Merge branch 'main' into crepererum/lazy_db_loading
2021-06-09 07:23:35 +00:00
Raphael Taylor-Davies
07c4277ca7
refactor: schema merge to give more control over field merging ( #1653 )
...
* refactor: schema merge to give more control over field merging
* chore: review feedback
2021-06-09 06:30:45 +00:00
Nga Tran
3e10351538
test: add tests for the sort plan
2021-06-08 21:40:46 -04:00
Nga Tran
68e3a2121f
feat: add SortExec
2021-06-08 15:04:31 -04:00
Andrew Lamb
fd8a87484e
feat: Hook up chunk grouping into provider
2021-06-08 14:42:37 -04:00
Nga Tran
edbf1b7d5e
Merge branch 'main' into ntran/dedup_within_chunk
2021-06-08 13:18:40 -04:00
Nga Tran
40cb4f741f
feat: initial implementaton
2021-06-08 13:17:36 -04:00
Carol (Nichols || Goulding)
50a69a7f18
fix: Don't mention Kafka unless it's absolutely necessary
2021-06-07 13:01:04 -04:00
Carol (Nichols || Goulding)
2bb2c4ba47
docs: Add some doc comments about the WriteBuffer trait
2021-06-07 11:22:33 -04:00
Carol (Nichols || Goulding)
a8a4a5f29d
fix: Return the Sequence type from the write buffer, not vague WriteMetadata
2021-06-07 11:15:46 -04:00
Carol (Nichols || Goulding)
a63c12acfb
fix: Remove references to Kafka from db tests
2021-06-07 10:58:34 -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
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
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
ff3215e6a9
feat: Implement Chunk Pruning ( #1567 )
2021-06-04 13:05:22 +00:00
Marco Neumann
195644da04
docs: document semaphore design in server
2021-06-04 12:52:13 +02:00
kodiakhq[bot]
402ef0ebde
Merge branch 'main' into crepererum/limit_cleanup_amount
2021-06-04 10:47:33 +00:00
Marco Neumann
e06d65bb2a
refactor: migrate "DBs initialized" RPC to "server status"
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
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
Edd Robinson
e583e1fbda
Merge branch 'main' into er/feat/read_buffer/float_int
2021-06-03 14:48:36 +01:00
Andrew Lamb
eaa5b75437
refactor: Make it clear only partition_key and table name pruning happens in catalog ( #1608 )
...
* refactor: Make it clear only partition_key and table name pruning is happening in catalog
* fix: clippy
* fix: Update server/src/db/catalog.rs
Co-authored-by: Carol (Nichols || Goulding) <193874+carols10cents@users.noreply.github.com>
* refactor: use TableNameFilter enum rather than Option
* docs: Add docstring to the `From` implementation
* fix: Update server/src/db/catalog/partition.rs
Co-authored-by: Edd Robinson <me@edd.io>
Co-authored-by: Carol (Nichols || Goulding) <193874+carols10cents@users.noreply.github.com>
Co-authored-by: Edd Robinson <me@edd.io>
2021-06-03 13:09:09 +00:00
Edd Robinson
65bfa4dd10
test: fix tests
2021-06-03 12:32:40 +01:00
Marco Neumann
27b9477aa4
test: fix flaky test
2021-06-03 11:23:29 +02:00
Marco Neumann
7b2663a38a
test: make tests faster
2021-06-03 11:23:29 +02:00
Marco Neumann
3c9fd81697
refactor: split overlong line
2021-06-03 11:23:29 +02:00
Marco Neumann
bbd73e59be
feat: jitter background clean-up job + wait on first job
2021-06-03 11:23:29 +02:00
Marco Neumann
ce412dbce2
fix: use structured error for background cleanup task reporting
2021-06-03 11:23:29 +02:00
kodiakhq[bot]
1c764c47a2
Merge branch 'main' into ntran/deduplicate
2021-06-02 17:42:36 +00:00
Nga Tran
40bd932fff
refactor: address Andrew's comment
2021-06-02 13:41:46 -04:00
Andrew Lamb
32c6ed1f34
refactor: More cleanup related to multi-table chunks ( #1604 )
...
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-06-02 17:00:23 +00:00
Nga Tran
e7a97f3ac1
test: merge main and add more tests for deduplicate work
2021-06-02 12:00:40 -04:00
Marco Neumann
80f4d84ce8
refactor: isolate DB loading and streamline error handling
...
There are not functional changes here (except that errors look slightly
different) but it should allow for an easier move of the DB loading into
a delayed task.
2021-06-02 13:42:24 +02:00
kodiakhq[bot]
0e09b20ca8
Merge branch 'main' into crepererum/issue1513-b
2021-06-02 07:08:29 +00:00
Nga Tran
40df7def0e
test: ttests for the deduplicate work
2021-06-01 18:06:35 -04:00
Nga Tran
60ad929721
refactor: add macro tto compare output of explains
2021-06-01 16:39:14 -04:00
Nga Tran
aa867601e5
chore: merge main with DF plan display fix
2021-06-01 16:17:41 -04:00
Nga Tran
0ad258bab3
refactor: remove comments since the time function predicates are pushed down after the recent constant folding fix in DF
2021-06-01 16:00:09 -04:00
Andrew Lamb
d8fbb7b410
refactor: Remove last vestiges of multi-table chunks from PartitionChunk API ( #1588 )
...
* refactor: Remove last vestiges of multi-table chunks from PartitionChunk API
* fix: remove test that can no longer fail
* fix: update tests + code review comments
* fix: clippy
* fix: clippy
* fix: restore test_measurement_fields_error test
2021-06-01 16:12:33 +00:00
Marco Neumann
714a082f3a
refactor: remove chunk state struct nesting
...
Inline structs that are only used for enum variants.
2021-06-01 18:00:16 +02:00
Marco Neumann
5a4562f1c9
test: test `Chunk::new_open`
2021-06-01 18:00:16 +02:00
Marco Neumann
f45e61f9ef
test: test chunk lifecycle action handling
2021-06-01 18:00:16 +02:00
Marco Neumann
50636ca011
refactor: rename `Chunk::{set_closed => freeze}` and add tests
...
This make it clearer what is actually happening. Furthermore, freezing
frozen chunks is now a no-op.
2021-06-01 18:00:16 +02:00
kodiakhq[bot]
aafc8c4746
Merge branch 'main' into crepererum/fix_catalog_replay_logging
2021-06-01 15:59:42 +00:00
Marco Neumann
98c2963c28
fix: fix confusing log message during catalog replay
2021-06-01 17:58:38 +02:00
Andrew Lamb
d3711a5591
refactor: Use ParquetExec from DataFusion to read parquet files ( #1580 )
...
* refactor: use ParquetExec to read parquet files
* fix: test
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-06-01 14:44:07 +00:00
Andrew Lamb
64328dcf1c
feat: cache schema on catalog chunks too ( #1575 )
2021-06-01 12:42:46 +00:00
kodiakhq[bot]
4e7b754098
Merge branch 'main' into crepererum/issue1513-a
2021-06-01 08:23:01 +00:00
Raphael Taylor-Davies
6e07a735bd
feat: don't recompute chunk size on every iteration ( #1586 )
2021-05-31 16:19:11 +00:00
Andrew Lamb
73cedd2f88
chore: remove unused dependency ( #1587 )
...
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-05-31 14:22:11 +00:00
Marco Neumann
991314ebe8
docs: fix `set_writing_to_object_store` docstring
2021-05-31 15:44:29 +02:00
Marco Neumann
996ce833f1
chore: fix formatting
2021-05-31 15:42:13 +02:00
Andrew Lamb
162a808a8d
refactor: Remove `table_name` from PartitionChunk API ( #1584 )
...
* refactor: Remove `table_name` from PartitionChunk API
* fix: clippy
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-05-31 12:05:09 +00:00
Marco Neumann
c658a627ed
refactor: change state structure for chunks
...
This is the first step towards #1513 . However it leaves all consumers
bascially unchanged and also does NOT touch state transitions. These
changes will follow in upcoming PRs.
2021-05-31 11:19:01 +02:00
Raphael Taylor-Davies
db432de137
feat: add distinct count to StatValues ( #1568 )
2021-05-28 17:41:34 +00:00
Raphael Taylor-Davies
d8f19348bf
feat: per-column dictionaries in MUB ( #1570 )
...
* feat: per-column dictionaries in MUB
* chore: fmt
* refactor: remove chunk-level dictionary
* chore: remove redundant sort
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-05-28 13:51:56 +00:00
kodiakhq[bot]
d70d7a63a2
Merge branch 'main' into crepererum/remove_invalid_chunk_state
2021-05-28 10:20:05 +00:00
Andrew Lamb
c6f42cf304
refactor: Remove unnecessary code ( #1573 )
...
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-05-28 10:12:47 +00:00
Marco Neumann
5cfede51f2
refactor: remove `ChunkState::Invalid`
...
This seems to only exist to fight the borrow checker and we can actually
live without it.
2021-05-28 11:16:06 +02:00
Andrew Lamb
3ae44a0375
refactor: Chunks can have at most one object store path ( #1574 )
...
* refactor: Chunk can have at most one path
* fix: update tests
2021-05-27 19:52:09 +00:00
Nga Tran
62147ff0d4
feat: add more explain tests
2021-05-27 12:19:41 -04:00
Andrew Lamb
f3bec93ef1
feat: Cache TableSummary in Catalog rather than computing it on demand ( #1569 )
...
* feat: Cache `TableSummary` in catalog Chunks
* refactor: use consistent table summary
2021-05-27 16:03:05 +00:00
Raphael Taylor-Davies
5d342d7779
feat: associate tracker with lifecycle action ( #1099 ) ( #1556 )
...
* feat: associate tracker with lifecycle action (#1099 )
* chore: docs
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-05-27 10:47:35 +00:00
Raphael Taylor-Davies
792bff07d1
feat: only store ChunkSnapshot in Closed state ( #1560 )
...
* feat: only store ChunkSnapshot in Closed state
* chore: review feedback
* feat: record MUB size as closed size
* chore: document column ordering assumption
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-05-27 10:36:47 +00:00
Raphael Taylor-Davies
4fcc04e6c9
chore: enable arrow prettyprint feature ( #1566 )
2021-05-27 10:28:14 +00:00
kodiakhq[bot]
efe077da8f
Merge branch 'main' into crepererum/issue1313
2021-05-26 14:46:18 +00:00
Marco Neumann
24ec1a472e
fix: do NOT delete parquet files that are reachable by time travel
2021-05-26 12:38:54 +02:00
Raphael Taylor-Davies
c03b8a3963
refactor: remove tables from ChunkSnapshot ( #1295 ) ( #1558 )
2021-05-26 10:37:40 +00:00
Marco Neumann
1fb6af2364
refactor: split DB background loop into lifecycle and cleanup
...
This should prevent one from blocking / stalling the other.
2021-05-26 11:09:30 +02:00
Marco Neumann
5983336366
refactor: rename `parquet_file::{utils => test_utils}`
2021-05-26 11:09:29 +02:00
Marco Neumann
dd6bbeec42
feat: add background task to clean up OS
...
Closes #1313 .
2021-05-26 11:04:56 +02:00
Marco Neumann
cc78b5317d
feat: add method to get all parquet files from catalog state
2021-05-26 11:02:40 +02:00
kodiakhq[bot]
166851d952
Merge branch 'main' into crepererum/in_file_metadata
2021-05-26 07:39:53 +00:00
Marko Mikulicic
bae5e5aee3
feat: Add simpler RoutingConfig
2021-05-25 21:51:54 +02:00
Marco Neumann
19a2733d30
feat: preserve transaction metadata in parquets
2021-05-25 09:56:12 +02:00
Marco Neumann
fe8e6301fe
refactor: move `read_schema_from_parquet_metadata` back to `parquet_file::metadata`
...
Let us pool all metadata handling in a single module, which makes it
easier to review.
2021-05-25 09:37:53 +02:00
Marko Mikulicic
a4215f0a56
fix: Fix 'acive' jemalloc stat misreporting
2021-05-25 02:55:27 +02:00
Nga Tran
018e1e0246
chore: add a comment to trick github to check semantic
2021-05-24 17:25:14 -04:00
Nga Tran
40a5d7d4ba
chore: Merge branch 'main' into tran/pushdown_parquet
2021-05-24 16:31:06 -04:00
Nga Tran
e72ae81a8e
feat: support predicate pushdown for parquet files
2021-05-24 16:22:52 -04:00
kodiakhq[bot]
db96286ed7
Merge branch 'main' into er/refactor/scalar_comp
2021-05-24 17:02:14 +00:00
Andrew Lamb
c464ffadad
refactor: remove special case timestamp_range in parquet chunk ( #1543 )
...
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-05-24 16:19:44 +00:00
Andrew Lamb
14ba25f86d
chore: Update datafusion and use released version of arrow crates ( #1546 )
...
* chore: Update datafusion and use released version of arrow crate
* fix: Update for change in API
2021-05-24 15:37:22 +00:00
Edd Robinson
abe64c6edc
test: uncomment tests to fix
2021-05-24 16:18:53 +01:00
Carol (Nichols || Goulding)
5c5064bdac
fix: Set default line timestamp and default partition time to same value ( #1512 )
...
* refactor: Rearrange to allow injection of the current time in tests
* test: Failing test showing a point can be in the wrong partition
* fix: Only get the default time once per ShardedEntry creation, in router
2021-05-24 14:55:11 +00:00
Andrew Lamb
27e5b8fabf
refactor: Remove multiple table support from Parquet Chunk ( #1541 )
2021-05-24 08:40:31 -04:00
Nga Tran
1f70d1f9c8
chore: remove a couple more comments
2021-05-21 17:06:53 -04:00
Nga Tran
f113abacb5
feat: more unit & e2e tests plus cleanup and addressing review comments of Andrew and Edd
2021-05-21 16:48:43 -04:00
Nga Tran
1093542578
fix: now all tests pass. Next step is cleaning up and addressing review comments
2021-05-21 13:29:20 -04:00
Nga Tran
784ef88fcd
chore: merge main to branch and add more tests that expose a wrong result bug on unsigned int
2021-05-21 12:38:06 -04:00
Nga Tran
93afc9c213
chore: more tests
2021-05-21 11:39:12 -04:00
Raphael Taylor-Davies
5b619733d9
refactor: split lifecycle tracking from chunk state ( #1361 ) ( #1099 ) ( #1397 )
...
* refactor: split lifecycle tracking from chunk state (#1361 ) (#1099 )
* chore: namespace internal errors
* chore: fix logical conflict
* chore: don't remove moving chunk size metric
2021-05-21 09:27:44 +00:00
Nga Tran
e44a3a87db
feat: fnow predicate is actuallu pushed down to RUB but there are bugs and not working yet
2021-05-20 16:56:15 -04:00
kodiakhq[bot]
f028a356f4
Merge branch 'main' into crepererum/issue1382-c
2021-05-20 15:51:47 +00:00
kodiakhq[bot]
aac00d4fa6
Merge branch 'main' into crepererum/remove_snapshotting
2021-05-20 14:14:58 +00:00
Marco Neumann
0e37d500eb
feat: remove snapshot feature
...
The parquet files produced by this code path are only semi-specified and
will miss many important metadata aspects that we will require for data
lineage.
2021-05-20 14:59:04 +02:00
Marko Mikulicic
462a5590c6
fix: fmt
2021-05-20 14:58:50 +02:00
Marko Mikulicic
c908cf0f98
fix: review suggestion
...
Co-authored-by: Edd Robinson <me@edd.io>
2021-05-20 14:40:02 +02:00
Marko Mikulicic
aa90329c1f
feat: Add remote_template for simpler remote configuration
2021-05-20 12:45:08 +02:00
Marco Neumann
7e55544eef
fix: correctly track chunk ID counter during catalog replay
2021-05-20 10:32:40 +02:00
Marco Neumann
93251f22c7
feat: read perserved catalog during DB startup
...
Closes #1382 .
2021-05-20 10:28:31 +02:00
Marko Mikulicic
91d7189e6d
feat: Log cached connections
2021-05-20 10:27:20 +02:00
Raphael Taylor-Davies
37880ee89a
refactor: store chunk IDs only in catalog ( #1521 )
...
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-05-20 04:07:14 +00:00
Nga Tran
00dacb5394
feat: add tests to verify the correctness as well as the explain of the plan
2021-05-19 17:31:16 -04:00
Nga Tran
11561111d5
chore: merge main to branch
2021-05-19 15:11:15 -04:00
Nga Tran
087d61f229
feat: Part 1 of predicate push down - Send predicates to MUB, RUB, and Parquet File. Note that MUB has not handled predicates yet
2021-05-19 13:59:51 -04:00
Marko Mikulicic
ce2f8351be
fix: Cache outbound gRPC connections
2021-05-19 18:28:45 +02:00
Marco Neumann
8db26485a4
refactor: empty transaction during catalog creation
...
That involves some refactoring which we are going to need anyway for
hooking up the "read" path of the catalog into the DB startup, namely:
- make `Db::new` require a preserved catalog
- introduce a helper function that can provide that
- as a consequence, all test-creations of a Db are now async
This prepares for #1382 .
2021-05-18 17:42:07 +02:00
kodiakhq[bot]
c3cc58b2ff
Merge branch 'main' into crepererum/issue1382
2021-05-17 17:57:26 +00:00
Raphael Taylor-Davies
4f0e46bcd5
refactor: track ingest metrics in one place ( #1503 )
...
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-05-17 16:25:01 +00:00
Marco Neumann
18f0a7f614
docs: reference open issue
2021-05-17 14:01:51 +02:00
Marco Neumann
cdf0ada6a6
test: test preserved catalog <-> Db write wiring
2021-05-17 13:57:31 +02:00
Raphael Taylor-Davies
91a45fd380
feat: simplify shutdown ( #1502 )
...
* feat: simplify shutdown
* chore: fix lint
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-05-17 11:50:14 +00:00
Marco Neumann
4299371cf2
refactor: remove some code
2021-05-17 12:32:48 +02:00
Marco Neumann
840c11dab2
feat: wire up catalog preservation write path
...
Required a bit of refactoring:
- Add an extra layer between DB an catalog which is the "preserved
catalog" wrapper. This is required to make the ownership model
somewhat sane, because during the read operations the "preserved
catalog" is going to act on the in-mem catalog.
- Move "parquet file written" logic into binding `preserved catalog <->
catalog state`, so we have a single place where new parquet files are
announced. For now this only works for chunks that are already known
(i.e. the writing->written transation when coming from read buffer),
however in the next PR this will be extended to also handle totally
new parquet files during transaction playback.
**NOTE: This does NOT include the read path yet!**
Issue: #1382 .
2021-05-17 11:33:22 +02:00
Andrew Lamb
07db4932ee
refactor: rename data_types/src/chunk.rs -> data_types/src/chunk_metadata.rs ( #1500 )
2021-05-15 10:18:01 +00:00
Raphael Taylor-Davies
f9178dbb5f
feat: push metrics into catalog ( #1488 )
...
* feat: push metrics into catalog
* chore: minor cleanup
* fix: include db labels in chunk metric domains
* chore: fmt
* fix: don't allow dropping moving chunks
* chore: further tweaks
* chore: review feedback
* feat: use new_unregistered() for metric instruments instead of default
* chore: use &[KeyValue] instead of &Vec<KeyValue>
* refactor: make GauageValue non default constructible
2021-05-14 17:37:39 +00:00
kodiakhq[bot]
fdc8461c7f
Merge branch 'main' into cn/wb-clock
2021-05-14 13:00:06 +00:00
Marko Mikulicic
35c2ca17fc
fix: Add ingest_fields_total
...
ingest_lines_total count lines (which apparently are the same as points, quite confusingly)
No yaks harmed in the making of this PR.
(NOTE: the code around metric, especially dealing with happy and error paths is very painful;
to be done in another PR)
2021-05-13 17:55:07 +02:00
Nga Tran
9583636748
feat: we now can read parquet files form all kind of object stores
2021-05-12 18:05:34 -04:00
Carol (Nichols || Goulding)
8be95856ab
test: Add a test with multiple threads using a process clock
2021-05-12 13:31:26 -04:00
Carol (Nichols || Goulding)
cecb4afc58
docs: Add some documentation on the assumptions around this design
2021-05-12 13:31:26 -04:00
Carol (Nichols || Goulding)
b3fb61a0b3
refactor: Rename now_nanos to system_clock_now for clarity
2021-05-12 13:31:26 -04:00
Carol (Nichols || Goulding)
425aacc391
refactor: Extract ProcessClock into its own type
2021-05-12 13:31:26 -04:00
Carol (Nichols || Goulding)
b749353d21
refactor: Use a compare_exchange loop instead of Arc Mutex
2021-05-12 10:58:08 -04:00
Carol (Nichols || Goulding)
5dfd152549
test: Use the now_nanos helper function more in tests
2021-05-12 10:58:08 -04:00
Carol (Nichols || Goulding)
f28c9ae04c
docs: Add unit and semantic information about the process clock
2021-05-12 10:58:08 -04:00
Carol (Nichols || Goulding)
513d4731be
feat: Add a process clock to Db and use it for Sequenced Entries
...
Connects to #1157 .
2021-05-12 10:58:06 -04:00
Carol (Nichols || Goulding)
f98807936d
test: Some tests don't call await, so they don't need to be async
2021-05-12 10:57:05 -04:00
Edd Robinson
696e4e0cfd
fix: ensure metrics not overwriting
2021-05-11 20:57:31 +01:00
Raphael Taylor-Davies
4409d2c8af
feat: instrument catalog locks ( #1464 )
...
* feat: instrument catalog locks (#1355 )
* chore: add metrics test
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-05-11 18:59:11 +00:00
Andrew Lamb
9d0c3a2b1a
refactor: Remove multi-table per chunk code in MUB ( #1471 )
...
* refactor: Remove multi-table per chunk code in MUB
* fix: clippy
* fix: bench build
* fix: merge conflicts
2021-05-11 17:49:07 +00:00
Raphael Taylor-Davies
d1da954fe4
feat: don't store encoded strings twice in RLE dictionaries ( #1469 )
2021-05-11 15:22:25 +00:00
Edd Robinson
3622a92c8b
feat: wire in rb column metrics
2021-05-11 13:00:52 +01:00
Marco Neumann
795f5bfcb7
refactor: make `StatValues::{min,max}` optional + handle NaNs
...
This will allow us to:
- handle all-NULL columns correctly
- be in-line with Parquet (where min/max are optional)
- handle NaNs at least somewhat sane (they do not "poison" stats
anymore)
2021-05-10 17:12:25 +02:00
Andrew Lamb
f037c1281a
feat: Calculate all system tables "on demand" ( #1452 )
...
* feat: compute system.columns table on demand
* feat: compute system.chunk_columns on demand
* feat: compute system.operations on demand
* fix: fixup schemas
* fix: Log errors
* fix: clippy
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-05-10 14:43:55 +00:00
Marko Mikulicic
9f5350a6c5
fix: Load only databases for which a config exists
...
Closes #1450
2021-05-10 13:14:22 +02:00
Nga Tran
c6b933eb63
chore: merge main to branch
2021-05-07 18:40:17 -04:00
Nga Tran
971500681f
refactor: address Andrew's and Carol's comment
2021-05-07 17:33:19 -04:00
Nga Tran
ba015ee4df
refactor: clean up and add comments
2021-05-07 09:31:41 -04:00
Edd Robinson
eae3fec571
feat: wire up regex UDF as predicate filter expr
2021-05-07 13:44:51 +01:00
Andrew Lamb
b5ea71f45f
feat: Expose the storage usage for each column in system.chunk_columns ( #1441 )
...
* feat: Expose the storage usage for each column in system.chunk_columns
* fix: fixup logical conflicts
* refactor: move coalsce logic into the read buffer
* fix: Update system_tables to not use coalese
* fix: Improve comments
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-05-07 12:36:49 +00:00
Raphael Taylor-Davies
9320f59de0
feat: add shard sink indirection ( #1447 )
...
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-05-07 11:04:51 +00:00
Andrew Lamb
d7253c72c0
feat: Only calculate system.chunks table "on demand" ( #1446 )
...
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-05-07 10:26:56 +00:00
Carol (Nichols || Goulding)
febc1538ff
chore: Update Rust version ( #1445 )
...
* chore: Update Rust version
* refactor: Make struct constructor field orderings consistent
Sometimes I changed the struct definition, sometimes changed the struct
construction instance, depending on consistency with code around each
(other similar structs, function argument orders, etc)
More info: https://rust-lang.github.io/rust-clippy/master/index.html#inconsistent_struct_constructor
* refactor: Use flatten where appropriate
One instance is a false positive with a clippy bug.
More info:
- https://rust-lang.github.io/rust-clippy/master/index.html#filter_map_identity
- https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten
* refactor: Use Option map instead of match
More info: https://rust-lang.github.io/rust-clippy/master/index.html#manual_map
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-05-06 22:07:10 +00:00
Nga Tran
55bf848bd2
feat: Now we can query directly from files in object store
2021-05-06 18:02:17 -04:00
Raphael Taylor-Davies
7f6b11266d
feat: instrument catalog locks ( #1355 ) ( #1439 )
...
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-05-06 17:09:52 +00:00
Raphael Taylor-Davies
44de42906f
refactor: use Arc<str> instead of Arc<String> ( #1442 )
2021-05-06 17:05:08 +00:00
Raphael Taylor-Davies
49c0b8b90c
feat: pull-based metrics ( #1355 ) ( #1414 )
...
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-05-06 15:54:30 +00:00
Raphael Taylor-Davies
216903a949
refactor: move protobuf conversion logic to generated_types ( #1437 )
...
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-05-06 15:49:27 +00:00
Andrew Lamb
884baf7329
feat: add column_type and influxdb_column_type, remove row_count from system.columns ( #1415 )
...
* feat: add column_type and influxdb_column_type, remove row_count from system.columns
* fix: update tests
* fix: more test update
* fix: Apply suggestions from code review
Co-authored-by: Carol (Nichols || Goulding) <193874+carols10cents@users.noreply.github.com>
* fix: fmt
* fix: copy/paste type conversion to avoid cross dependency between data_types and internal_types
Co-authored-by: Carol (Nichols || Goulding) <193874+carols10cents@users.noreply.github.com>
2021-05-06 12:59:30 +00:00
Marko Mikulicic
578dc0db25
feat: Add more logs to shed light on the curious incident with missing metrics in the nighttime
2021-05-06 14:42:48 +02:00
Raphael Taylor-Davies
10f89a3e8d
refactor: split entry out into separate crate ( #1428 )
...
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-05-06 11:36:23 +00:00
Nga Tran
a5c92fae8a
chore: merge main to branch
2021-05-05 13:48:42 -04:00
Raphael Taylor-Davies
411cf134e9
refactor: explode arrow_deps ( #1425 )
...
* refactor: explode arrow_deps
* chore: workaround doctest bug
2021-05-05 16:59:12 +00:00
kodiakhq[bot]
4395ede244
Merge branch 'main' into debug-chunk-metrics
2021-05-05 15:43:32 +00:00
Marko Mikulicic
2b0d7cfb91
feat: Add debug to update_chunk_state metrics
2021-05-05 17:37:57 +02:00
Nga Tran
fcb37a0b1d
feat: more testing scenarios for quering parquet files
2021-05-05 10:57:02 -04:00
Carol (Nichols || Goulding)
4a64e22e64
refactor: Use trait object and deref instead of cloning Arc in tests
2021-05-05 10:55:12 -04:00
Carol (Nichols || Goulding)
e32fa43a53
docs: Add note about implication of write buffer errors
2021-05-05 10:55:12 -04:00
Carol (Nichols || Goulding)
7d5c988fba
feat: Actually route SequencedEntry to the Write Buffer, if present
...
Connects to #1157 .
Rearrange some code and comments to be consistent with the design. Make
some more places not care whether they're getting an owned or borrowed
SequencedEntry.
2021-05-05 10:55:11 -04:00
Carol (Nichols || Goulding)
54c5f984d5
fix: Use stdlib's path manipulation rather than format
...
The syntax highlighting in my editor broke because of the unmatched
double quote, which got me to look a bit closer at this test. These
tests would have failed on Windows.
2021-05-05 10:55:11 -04:00
Carol (Nichols || Goulding)
231abd221f
refactor: Extract a TestDbBuilder
2021-05-05 10:55:11 -04:00
Carol (Nichols || Goulding)
62dfb47825
refactor: Reorganize test imports
2021-05-05 10:55:11 -04:00