Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/risingwavelabs/risingwave i…
Browse files Browse the repository at this point in the history
…nto li0k/storage_commit_epoch
  • Loading branch information
Li0k committed Jul 9, 2024
2 parents 81d9cba + 9dabb6e commit 1821fc9
Show file tree
Hide file tree
Showing 244 changed files with 2,478 additions and 3,038 deletions.
57 changes: 14 additions & 43 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ license = "Apache-2.0"
repository = "https://github.com/risingwavelabs/risingwave"

[workspace.dependencies]
foyer = { version = "0.10.0", features = ["nightly", "mtrace"] }
foyer = { version = "0.10.1", features = ["nightly", "mtrace"] }
apache-avro = { git = "https://github.com/risingwavelabs/avro", rev = "25113ba88234a9ae23296e981d8302c290fdaa4b", features = [
"snappy",
"zstandard",
Expand Down Expand Up @@ -171,7 +171,7 @@ deltalake = { git = "https://github.com/risingwavelabs/delta-rs", rev = "5c2dccd
itertools = "0.12.0"
jsonbb = "0.1.4"
lru = { git = "https://github.com/risingwavelabs/lru-rs.git", rev = "2682b85" }
parquet = "50"
parquet = { version = "52", features = ["async"] }
thiserror-ext = "0.1.2"
tikv-jemalloc-ctl = { git = "https://github.com/risingwavelabs/jemallocator.git", rev = "64a2d9" }
tikv-jemallocator = { git = "https://github.com/risingwavelabs/jemallocator.git", features = [
Expand Down
4 changes: 2 additions & 2 deletions ci/scripts/docker-hdfs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ BUILDKITE_COMMIT="HDFS_$(echo $RANDOM | md5sum | head -c 20;)"

java_home_path=$(uname -m)
if [ "$arch" = "arm64" ] || [ "$arch" = "aarch64" ]; then
java_home_path="/usr/lib/jvm/java-11-openjdk-arm64"
java_home_path="/usr/lib/jvm/java-17-openjdk-arm64"
else
# x86_64
java_home_path="/usr/lib/jvm/java-11-openjdk-amd64"
java_home_path="/usr/lib/jvm/java-17-openjdk-amd64"
fi
echo $java_home_path

Expand Down
2 changes: 1 addition & 1 deletion docker/dashboards/risingwave-dev-dashboard.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docker/dashboards/risingwave-user-dashboard.json

Large diffs are not rendered by default.

9 changes: 8 additions & 1 deletion docs/dev/src/tests/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,21 @@ RisingWave requires all code to pass fmt, clippy, sort and hakari checks. Run th

There are also some miscellaneous checks. See `ci/scripts/misc-check.sh`.

## Unit tests
### Unit and integration tests

RiseDev runs unit tests with cargo-nextest. To run unit tests:

```shell
./risedev test # Run unit tests
```

Some ideas and caveats for writing tests:
- Use [expect_test](https://github.com/rust-analyzer/expect-test) to write data driven tests that can automatically update results.
- It's recommended to write new tests as *integration tests* (i.e. in `tests/` directory) instead of *unit tests* (i.e. in `src/` directory).

Besides, put integration tests under `tests/integration_tests/*.rs`, instead of `tests/*.rs`. See [Delete Cargo Integration Tests](https://matklad.github.io/2021/02/27/delete-cargo-integration-tests.html) and [#9878](https://github.com/risingwavelabs/risingwave/issues/9878), for more details.

You might want to read [How to Test](https://matklad.github.io/2021/05/31/how-to-test.html) for more good ideas on testing.

## Planner tests

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ CREATE SINK sink1 AS select * from mv1 WITH (
table.name = 't1',
catalog.name = 'demo',
catalog.type = 'storage',
warehouse.path = 's3://icebergdata/demo',
warehouse.path = 's3a://icebergdata/demo',
s3.endpoint = 'http://127.0.0.1:9301',
s3.region = 'us-east-1',
s3.access.key = 'hummockadmin',
Expand All @@ -45,7 +45,7 @@ CREATE SINK sink2 AS select * from mv1 WITH (
table.name = 't2',
catalog.name = 'demo',
catalog.type = 'storage',
warehouse.path = 's3://icebergdata/demo',
warehouse.path = 's3a://icebergdata/demo',
s3.endpoint = 'http://127.0.0.1:9301',
s3.region = 'us-east-1',
s3.access.key = 'hummockadmin',
Expand Down
2 changes: 1 addition & 1 deletion e2e_test/iceberg/test_case/cdc/load.slt
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ CREATE SINK s1 AS select * from products WITH (
database.name = 'demo_db',
table.name = 'demo_table',
catalog.type = 'storage',
warehouse.path = 's3://icebergdata/demo',
warehouse.path = 's3a://icebergdata/demo',
s3.endpoint = 'http://127.0.0.1:9301',
s3.region = 'us-east-1',
s3.access.key = 'hummockadmin',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ CREATE SINK s6 AS select * from mv6 WITH (
table.name = 'no_partition_append_only_table',
catalog.name = 'demo',
catalog.type = 'storage',
warehouse.path = 's3://icebergdata/demo',
warehouse.path = 's3a://icebergdata/demo',
s3.endpoint = 'http://127.0.0.1:9301',
s3.region = 'us-east-1',
s3.access.key = 'hummockadmin',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ WITH (
s3.access.key = 'hummockadmin',
s3.secret.key = 'hummockadmin',
catalog.type = 'storage',
warehouse.path = 's3://icebergdata/demo',
warehouse.path = 's3a://icebergdata/demo',
database.name = 'demo_db',
table.name = 'no_partition_append_only_table',
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ CREATE SINK s6 AS select mv6.id as id, mv6.v1 as v1, mv6.v2 as v2, mv6.v3 as v3,
database.name = 'demo_db',
table.name = 'no_partition_upsert_table',
catalog.type = 'storage',
warehouse.path = 's3://icebergdata/demo',
warehouse.path = 's3a://icebergdata/demo',
s3.endpoint = 'http://127.0.0.1:9301',
s3.region = 'us-east-1',
s3.access.key = 'hummockadmin',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ CREATE SINK s6 AS select * from mv6 WITH (
table.name = 'partition_append_only_table',
catalog.name = 'demo',
catalog.type = 'storage',
warehouse.path = 's3://icebergdata/demo',
warehouse.path = 's3a://icebergdata/demo',
s3.endpoint = 'http://127.0.0.1:9301',
s3.region = 'us-east-1',
s3.access.key = 'hummockadmin',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ WITH (
s3.access.key = 'hummockadmin',
s3.secret.key = 'hummockadmin',
catalog.type = 'storage',
warehouse.path = 's3://icebergdata/demo',
warehouse.path = 's3a://icebergdata/demo',
database.name = 'demo_db',
table.name = 'partition_append_only_table',
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ CREATE SINK s6 AS select mv6.id as id, mv6.v1 as v1, mv6.v2 as v2, mv6.v3 as v3,
database.name = 'demo_db',
table.name = 'partition_upsert_table',
catalog.type = 'storage',
warehouse.path = 's3://icebergdata/demo',
warehouse.path = 's3a://icebergdata/demo',
s3.endpoint = 'http://127.0.0.1:9301',
s3.region = 'us-east-1',
s3.access.key = 'hummockadmin',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ CREATE SINK s6 AS select * from mv6 WITH (
table.name = 'range_partition_append_only_table',
catalog.name = 'demo',
catalog.type = 'storage',
warehouse.path = 's3://icebergdata/demo',
warehouse.path = 's3a://icebergdata/demo',
s3.endpoint = 'http://127.0.0.1:9301',
s3.region = 'us-east-1',
s3.access.key = 'hummockadmin',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ WITH (
s3.access.key = 'hummockadmin',
s3.secret.key = 'hummockadmin',
catalog.type = 'storage',
warehouse.path = 's3://icebergdata/demo',
warehouse.path = 's3a://icebergdata/demo',
database.name = 'demo_db',
table.name = 'range_partition_append_only_table',
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ CREATE SINK s6 AS select mv6.id as id, mv6.v1 as v1, mv6.v2 as v2, mv6.v3 as v3,
database.name = 'demo_db',
table.name = 'range_partition_upsert_table',
catalog.type = 'storage',
warehouse.path = 's3://icebergdata/demo',
warehouse.path = 's3a://icebergdata/demo',
s3.endpoint = 'http://127.0.0.1:9301',
s3.region = 'us-east-1',
s3.access.key = 'hummockadmin',
Expand Down
4 changes: 2 additions & 2 deletions e2e_test/sink/iceberg_sink.slt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ CREATE SINK s6 AS select mv6.v1 as v1, mv6.v2 as v2, mv6.v3 as v3 from mv6 WITH
connector = 'iceberg',
type = 'upsert',
primary_key = 'v1',
warehouse.path = 's3://iceberg',
warehouse.path = 's3a://iceberg',
s3.endpoint = 'http://127.0.0.1:9301',
s3.access.key = 'hummockadmin',
s3.secret.key = 'hummockadmin',
Expand All @@ -23,7 +23,7 @@ CREATE SINK s6 AS select mv6.v1 as v1, mv6.v2 as v2, mv6.v3 as v3 from mv6 WITH
statement ok
CREATE SOURCE iceberg_demo_source WITH (
connector = 'iceberg',
warehouse.path = 's3://iceberg',
warehouse.path = 's3a://iceberg',
s3.endpoint = 'http://127.0.0.1:9301',
s3.access.key = 'hummockadmin',
s3.secret.key = 'hummockadmin',
Expand Down
1 change: 1 addition & 0 deletions e2e_test/source/cdc/postgres_cdc.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
-- PG
DROP TABLE IF EXISTS shipments;
CREATE TABLE shipments (
shipment_id SERIAL NOT NULL PRIMARY KEY,
order_id SERIAL NOT NULL,
Expand Down
Loading

0 comments on commit 1821fc9

Please sign in to comment.