Commit Graph

4161 Commits (0fe8eda89e66c849e20c04f0fb90e4d3e4879663)

Author SHA1 Message Date
Nga Tran 11ba4b5f6a fix: fix unit_test setting to have the desired results 2021-07-22 14:22:08 -04:00
Raphael Taylor-Davies 20d06e3225
feat: include more information in system.operations table (#2097)
* feat: include more information in system.operations table

* chore: review feedback

Co-authored-by: Andrew Lamb <alamb@influxdata.com>

Co-authored-by: Andrew Lamb <alamb@influxdata.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-07-22 17:16:09 +00:00
Andrew Lamb b3d6e3ed7b
fix: Implement pretty printer wity RFC3339 formatting for timestamps (#2096)
* fix: Implement pretty printer wity RFC3339 formatting for timestamps

* fix: doc strings + fmt
2021-07-22 17:08:27 +00:00
Carol (Nichols || Goulding) 05782eb980 refactor: Move first/last write times up to read buffer Chunk rather than MetaData 2021-07-22 12:27:46 -04:00
Carol (Nichols || Goulding) 14cb2a6bef test: Add assertions for first/last write times as chunks move 2021-07-22 11:35:23 -04:00
Carol (Nichols || Goulding) 37f24ebfc7 feat: Record first/last write times for creation of read_buffer::Chunk 2021-07-22 11:35:23 -04:00
Carol (Nichols || Goulding) 4e6b79534b feat: Require passing first/last write times for creation of Table 2021-07-22 11:35:23 -04:00
Carol (Nichols || Goulding) b7bedeaaf3 feat: Require passing first/last write times for creation of Table MetaData 2021-07-22 11:35:23 -04:00
Carol (Nichols || Goulding) 0c44179aa9 feat: Add first/last write time on DbChunk
To eventually be used in collect_rub
2021-07-22 11:35:23 -04:00
Carol (Nichols || Goulding) 799406be72 refactor: Have MUB chunk snapshots hold a TableSummaryAndTimes rather than only ColumnSummaries
This way we can have the first/last write times on MUB chunk snapshots
without needing to deconstruct/reconstruct TableSummaries as it was
doing.
2021-07-22 11:35:23 -04:00
Carol (Nichols || Goulding) 956647d966 docs: Fix an outdated comment 2021-07-22 11:35:23 -04:00
Carol (Nichols || Goulding) 8d1d877196 feat: Record first/last write times for RUB chunks 2021-07-22 11:35:22 -04:00
Carol (Nichols || Goulding) 28fc01ecee test: Make test failure messages easier to read 2021-07-22 11:15:19 -04:00
Carol (Nichols || Goulding) 16b07e5b31 refactor: Always use Table::with_row_group to ensure Tables are never empty
Remove Table::new that created an empty table.
2021-07-22 11:15:18 -04:00
Carol (Nichols || Goulding) 6feea3b2d5 feat: Require at least one RecordBatch to create a read_buffer::Chunk::new
In the signature only for the moment.
2021-07-22 11:15:18 -04:00
Carol (Nichols || Goulding) bbb4462264 refactor: Extract a function for the RecordBatch to RowGroup transformation with logging
So that we can call it from RBChunk::new too.
2021-07-22 11:15:18 -04:00
Carol (Nichols || Goulding) d347750366 refactor: Make collect_rub create the RBChunk
Which gets rid of the need for new_rub_chunk.

This will enable creating RBChunks that are guaranteed to have data.
2021-07-22 11:15:18 -04:00
Carol (Nichols || Goulding) 0a724878e6 refactor: Organize uses 2021-07-22 11:15:18 -04:00
Carol (Nichols || Goulding) 7371b0aabf refactor: Use existing new_rub_chunk function that has the same code 2021-07-22 11:15:18 -04:00
Carol (Nichols || Goulding) eadcb3265a refactor: Use some TryStreamExt adapters in collect_rub 2021-07-22 11:15:18 -04:00
Raphael Taylor-Davies 38e375d11a
feat: add chunk storage metrics (#2069)
* feat: add chunk storage metrics

* chore: review feedback

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-07-22 15:13:09 +00:00
Raphael Taylor-Davies 8c974beba0
feat: add access timestamps to CatalogChunk (#2075) (#2081)
* feat: add access timestamps to CatalogChunk (#2075)

* chore: review feedback

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-07-22 12:19:30 +00:00
kodiakhq[bot] f4b9fe20fd
Merge pull request #2084 from influxdata/crepererum/fix_checkpoints_again
refactor: correctly track "seen" ranges in persistence checkpoints
2021-07-22 11:45:39 +00:00
Marco Neumann 50241bae9e refactor: do not abuse `uint64::MAX` as sentinal for `None` 2021-07-22 12:51:43 +02:00
Marco Neumann 47ad397918 fix: address review comments 2021-07-22 12:37:07 +02:00
Paul Dix d95b5df03e refactor: move cache to ObjectStore
Since the consumers of ObjectStore always use the concrete type rather than the ObjectStoreApi trait, it makes more sense to just change the concrete type to have a pointer to the cache. This removes the cache from the ObjectStoreApi trait and changes the ObjectStore to be a regular struct rather than a tuple around the ObjectStoreIntegration. Future work will have the server configure the cache on the ObjectStore struct when its options are set.
2021-07-21 18:27:56 -04:00
Paul Dix 47044d537c chore: make cache a type in object store trait 2021-07-21 18:27:56 -04:00
Paul Dix d0ea812041 feat: add skeleton for object store file cache 2021-07-21 18:27:56 -04:00
Nga Tran b2063fb29f test: fix the stats and discover a bug in compaction/split/dedupplication 2021-07-21 17:40:48 -04:00
Marco Neumann 57a9d5ade0 refactor: correctly track "seen" ranges in persistence checkpoints
Now we can handle all these cases:

There are two partitions w/ a single write each:

1. A reads sequence number 1
2. B reads sequence number 2
3. we persist A which only knows the sequences up until 1
=> the DB checkpoint needs the global max, otherwise we forget sequences
   during replay (2 in this case, so B would be gone)

1. B reads sequence number 1
2. A reads sequence number 2
3. we persist A which (w/o this commit) would not track the sequencer at
   all in this checkpoint (since there is nothing to replay)
=> we MUST also remember that we already read up until 2, otherwise we'll
   re-read 2 after replay
=> the partition checkpoint needs the local seen max (no matter if there's
   something to to persist)
2021-07-21 19:19:49 +02:00
kodiakhq[bot] e1b2909818
Merge pull request #2079 from influxdata/crepererum/fix_db_checkpoints
fix: checkpoint collection (replay preparation)
2021-07-21 16:53:52 +00:00
kodiakhq[bot] 8c4f5cb237
Merge branch 'main' into crepererum/fix_db_checkpoints 2021-07-21 16:46:13 +00:00
kodiakhq[bot] 13ae2f0d78
Merge pull request #2070 from influxdata/ntran/dedup_compare_cols_order
feat: new algorithm to compute key ranges for deduplication
2021-07-21 15:50:11 +00:00
kodiakhq[bot] 18dd108ba6
Merge branch 'main' into ntran/dedup_compare_cols_order 2021-07-21 15:42:30 +00:00
Nga Tran 86add39175 refactor: address review comments 2021-07-21 11:41:21 -04:00
kodiakhq[bot] 56dd430d8f
Merge pull request #2077 from influxdata/crepererum/sequencer_metrics
feat: write buffer ingestion metrics
2021-07-21 13:30:22 +00:00
kodiakhq[bot] 91acf3911c
Merge branch 'main' into crepererum/sequencer_metrics 2021-07-21 13:23:23 +00:00
Marco Neumann 55490c279a fix: Kafka watermark error for new partitions 2021-07-21 15:21:52 +02:00
Marco Neumann cddf94653c refactor: use `write_buffer` subsystem for ingest metrics 2021-07-21 15:07:59 +02:00
Marco Neumann fd00206fbb refactor: increase watermark update frequence to once per 10s 2021-07-21 15:02:48 +02:00
Marco Neumann 2f1efcf517 docs: clarify difference 2021-07-21 15:00:53 +02:00
Marco Neumann 4d5f209030 docs: do not repeat unix that often 2021-07-21 14:59:07 +02:00
Marco Neumann a5fc1c7d38 fix: collect min AND max in database checkpoints
This is required to correctly handle the following case:

1. There are two partitions A and B w/ a single write each (from the same
   sequencer).
2. We persist A:
   - The partition checkpoint for A will be empty because after persistence
     there will be nothing to replay (the single write is persisted and
     we're ready).
   - The database checkpoint that contains the global minimum of all ranges
     recognizes that for the sequencer there is indeed something left (the
     minimum sequence number from B).
3. DB restart happens, replay starts
4. We scan all persisted files, figure out that we have a DB checkpoint
   with a sequence minimum but (w/o the change in this commit) there is no
   maximum. Only partition checkpoints contain maxima, and the only partition
   checkpoint that was persisted was the one for partition A and that one was
   empty (see above).
5. So now how do we recover partition B?
2021-07-21 14:48:29 +02:00
Marco Neumann ec866de193 fix: collect checkpoint data from all tables 2021-07-21 14:48:29 +02:00
Marco Neumann 7d597d1d5c refactor: make ingest metrics easier to understand 2021-07-21 13:57:53 +02:00
Raphael Taylor-Davies ffe6e62aee
feat: add instant to datetime conversion (#2078)
* feat: add instant to datetime conversion

* chore: review feedback
2021-07-21 11:43:27 +00:00
Marco Neumann fb931bb1ca feat: write buffer ingestion metrics 2021-07-21 11:59:52 +02:00
Marco Neumann 5df88c70aa feat: add ability to fetch watermarks from write buffer 2021-07-21 11:59:52 +02:00
kodiakhq[bot] 58108b79ec
Merge pull request #2058 from influxdata/pd/add-cache-config
feat: add parquet cache size setting to database rules
2021-07-21 09:42:07 +00:00
kodiakhq[bot] 94a45339fd
Merge branch 'main' into pd/add-cache-config 2021-07-21 09:35:26 +00:00