Commit Graph

1366 Commits (595d13956d98d40883415b02d6e6ce47321877f1)

Author SHA1 Message Date
Matt Freitas-Stavola 7e2df1fc59
chore(server): add logs for dropped WAL segments (#478)
* chore(server): add logs for dropped WAL segments

Added logging for dropped writes and old segments in rollover scenarios

Also including a dep on tracing and dev-dep on test_helpers

Refs: #466

* chore(server): Add more context to logs

Minor cleanup around remove_oldest_segment usage

Suggestions from @alamb's review
2020-11-24 16:37:09 -05:00
Andrew Lamb cdb26e60e4
refactor: rename `storage` crate to `query` to better reflect what it is (#475)
* refactor: rename storage --> query

* refactor: update a few more referenes
2020-11-24 14:19:29 -05:00
Andrew Lamb 85921fe401
feat: Implement gRPC and storage interface for read_group_aggregate (#474)
* feat: Implement gRPC and storage interface for read_group_aggregate

* fix: clippy

* docs: Tweak comments

* fix: moar clippy

* fix: fmt

* docs: Apply doc improvement suggestions from code review

Co-authored-by: Carol (Nichols || Goulding) <193874+carols10cents@users.noreply.github.com>

* refactor: improve error creation

* refactor: use match instead of if

* refactor: clearer match

* refactor: clean up storage aggregate matching

Co-authored-by: Carol (Nichols || Goulding) <193874+carols10cents@users.noreply.github.com>
2020-11-24 13:41:11 -05:00
Edd Robinson 634b0c00a5
Merge pull request #476 from influxdata/er/chore/contrib
chore: improve community contribution documentation
2020-11-24 14:05:56 +00:00
Edd Robinson 3b508d6041 chore: address PR feedback 2020-11-24 13:21:04 +00:00
Edd Robinson 900e1cce06 chore: PR suggestions
Co-authored-by: Andrew Lamb <alamb@influxdata.com>
2020-11-24 13:21:04 +00:00
Edd Robinson a32bfb6c4b chore: add WIP tip 2020-11-24 13:21:04 +00:00
Edd Robinson 736f1c4b03 chore: add github templates 2020-11-24 13:20:54 +00:00
Edd Robinson 05870a9d5c chore: update contribution docs 2020-11-24 13:20:27 +00:00
Carol (Nichols || Goulding) ea3d723719
Merge pull request #473 from ming535/ming
docs: update readme
2020-11-23 13:15:37 -05:00
Carol (Nichols || Goulding) ba3d4a2b72
Merge pull request #469 from influxdata/dotenv-dep
fix: dotenv is both a build and a dev dependency
2020-11-23 13:15:04 -05:00
huming 2f9afa11da docs: update readme 2020-11-24 00:21:23 +08:00
Andrew Lamb a03eb6e8f7
docs: Add mentions of `unsafe` and platform dependent compilation in style guide (#472) 2020-11-23 11:14:33 -05:00
Andrew Lamb e1403479c7
refactor: rename historically named write_buffer_server (#467)
* refactor: rename historically named write_buffer_server

* fix: fmt
2020-11-20 16:14:51 -05:00
Carol (Nichols || Goulding) 085f91000d fix: dotenv is both a build and a dev dependency 2020-11-20 13:18:28 -05:00
Paul Dix e9e92ece32
Merge pull request #468 from influxdata/pd-rename_cluster
chore: rename cluster crate to server
2020-11-20 12:31:30 -05:00
Paul Dix 59e2024d01 chore: rename cluster crate to server 2020-11-20 12:14:12 -05:00
Paul Dix 5101e52434
Merge pull request #464 from influxdata/pd-wal_buffer-main
feat: Implement WAL in-memory buffer
2020-11-20 11:16:30 -05:00
Paul Dix b38fb80c14 chore: ensure sequence increasing in wal segment 2020-11-20 08:35:35 -05:00
Andrew Lamb 7237572111
docs: Clarify the intent of the `Database` trait (#463)
* docs: Clarify the intent of the `Database` trait

* docs: Update storage/src/lib.rs

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

Co-authored-by: Edd Robinson <me@edd.io>
2020-11-20 07:14:25 -05:00
Paul Dix 0deee2c0db feat: Implement WAL in-memory buffer
This splits the cluster package out into server and buffer modules. The WAL buffer is in-memory and split into segments. Follow on commits will implement it in the server and add persistence to object storage.
2020-11-19 19:35:17 -05:00
Paul Dix f740c85faa
Update README.md 2020-11-18 15:13:37 -05:00
Edd Robinson dc3c2b1536
Merge pull request #457 from influxdata/er/feat/plain-dictionary
feat: add in-memory Dictionary column encoding
2020-11-18 16:41:39 +00:00
Andrew Lamb cad5f9166b
feat: Port Duration and Window logic to support window aggregates (#460)
* feat: Port enough of Window and Duration to implement window_bounds

* fix: clippy

* fix: Add a few more source links

* fix: Eust --> Rust in comments :(

* fix: add comments about remainder, and add test demonstraitng behavior

* fix: Apply suggestions from code review
2020-11-18 09:49:59 -05:00
Paul Dix b1ae1e8e91
Update README.md 2020-11-17 17:14:45 -05:00
Paul Dix 398030d792
Update README.md 2020-11-17 15:31:34 -05:00
Paul Dix f7627266c1
Update README.md 2020-11-17 13:55:14 -05:00
Andrew Lamb fe663c3534
feat: add cpu_feature_check (#458)
* feat: add cpu_feature_check

* fix: clarify output
2020-11-17 13:28:23 -05:00
Edd Robinson 0720cc36d0 refactor: address PR feedback 2020-11-17 15:41:58 +00:00
Edd Robinson 936eb16ce2
refactor: update segment_store/src/column/dictionary/plain.rs
Co-authored-by: Andrew Lamb <alamb@influxdata.com>
2020-11-17 14:55:02 +00:00
Paul Dix 7f21283e79
Merge pull request #456 from influxdata/pd-update-readme
chore: Update README with intro and status
2020-11-17 07:44:24 -05:00
Paul Dix a096f688d3 chore: Update README with intro and status 2020-11-17 07:39:26 -05:00
Edd Robinson 556f4dd343 refactor: tidy up API 2020-11-16 22:16:12 +00:00
Edd Robinson a2338b9348 perf: add SIMD-enabled method of matching equality predicate
This commit adds an alternative implementation of `row_ids_equal` for
the `Plain` dictionary encoding, which uses SIMD intrinsics to improve
the performance of identifying all rows in the column containing a
specified `u32` integer.

The approach is as follows. First, the integer constant of interest is
packed into a 256 bit SIMD register. Then the column is iterated over
in chunks of size 8 (thus, 256 bits at a time). The expectation is that
for a colum using this encoding it is likely most values will not match
an equality predicate, so the happy path is to compare the packed
register against each chunked register. This is done using the
`_mm256_cmpeq_epi32`[1] intrinsic, which returns a mask where each 32
bits is `0xFFFFFFFF` if the two values at that location in the register
are equal, or `0x00000000` otherwise.

Becuase the expectation is that most values don't match the id we want,
we check if all 32-bit values in this 256-bit mask register are `0`. If
the register's values are not all 0 then the register is inspected to
determine the locations where values match. The offsets of these values
are used to determine the row id to add to the result set.

On my laptop, benchmarking indicates that the SIMD implementation
increases throughput performance (finding all matching rows) by
~100%-390%.

This SIMD implementation will be automatically used if the CPU supports
avx2 instructions, otherwise the a non-SIMD implementation will be
fallen back to.

[1] https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm256_cmpeq_epi32&expand=774
```
2020-11-16 22:12:25 +00:00
Edd Robinson 25af7674ca perf: benchmark plain dictionary encoding 2020-11-16 22:12:25 +00:00
Edd Robinson d54c30147e refactor: expose public API 2020-11-16 22:12:25 +00:00
Edd Robinson fc881776dd feat: implement size and cardinality 2020-11-16 22:12:25 +00:00
Edd Robinson 43373cb650 feat: implement size on Dictionary encoding 2020-11-16 22:12:25 +00:00
Edd Robinson 1252d1b2f4 feat: wire up Plain dictionary encoder 2020-11-16 22:12:25 +00:00
Edd Robinson 94d37a9ff2 refactor: rename Column StringEncoding::RLE to RLEDictionary 2020-11-16 22:12:25 +00:00
Edd Robinson 59512bff74 feat: implement materialisation functionality 2020-11-16 22:12:25 +00:00
Edd Robinson 04505bf818 feat: implement row_ids_filter 2020-11-16 22:12:25 +00:00
Edd Robinson a6627aa5db feat: implement push on plain dict encoding 2020-11-16 22:12:25 +00:00
Edd Robinson d8f382e5b7 feat: skeleton dictionary plain encoding 2020-11-16 22:12:25 +00:00
Edd Robinson bcd8a63556 refactor: introduce dictionary enum and wire tests 2020-11-16 22:12:25 +00:00
Edd Robinson b2c69dff1d refactor: create dictionary module 2020-11-16 22:12:25 +00:00
Andrew Lamb 597933622d
fix: improve error messages with more context (#455) 2020-11-16 16:40:29 -05:00
Andrew Lamb 831a0875d6
chore: update to latest arrow + Rust nightly-2020-11-14 (#454)
* chore: update to latest arrow + Rust nightly-2020-11-14

* chore: update ci

* fix: update for clippy lints

* fix: Allow redundant_field_names in generated types crate

* fix: clippy about try_for_each

* fix: clippy uneeded-collect

* fix: clippy about default values

* fix: clippy mathces --> matches!

* fix: clippy sort --> sort_by_key

* fix: clippy about default values again
2020-11-16 11:48:42 -05:00
Arve Knudsen cc6394d68a
fix: return error from binding HTTP server address instead of panicking (#453)
Signed-off-by: Andrew Lamb <alamb@influxdata.com>
2020-11-16 10:59:47 -05:00
Andrew Lamb 87626a3635
feat: Update storage protobuf definitions, add stubs for read_window_aggregate (#444)
* feat: Update storage protobuf definitions, add stubs for read_window_aggregate

* refactor: Extract the features field in a clearer way

* docs: Add provenance information to service.proto
2020-11-12 07:07:42 -05:00