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_split_group_v2
  • Loading branch information
Li0k committed Sep 29, 2024
2 parents 48eb6f3 + 04af708 commit fe8cc7e
Show file tree
Hide file tree
Showing 175 changed files with 2,446 additions and 1,336 deletions.
34 changes: 17 additions & 17 deletions Cargo.lock

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

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/docker-compose-distributed-etcd.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
version: "3"
x-image: &image
image: ${RW_IMAGE:-risingwavelabs/risingwave:v2.0.0}
image: ${RW_IMAGE:-risingwavelabs/risingwave:v2.0.1}
services:
compactor-0:
<<: *image
Expand Down
2 changes: 1 addition & 1 deletion docker/docker-compose-distributed.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
x-image: &image
image: ${RW_IMAGE:-risingwavelabs/risingwave:v2.0.0}
image: ${RW_IMAGE:-risingwavelabs/risingwave:v2.0.1}
services:
compactor-0:
<<: *image
Expand Down
2 changes: 1 addition & 1 deletion docker/docker-compose-etcd.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
version: "3"
x-image: &image
image: ${RW_IMAGE:-risingwavelabs/risingwave:v2.0.0}
image: ${RW_IMAGE:-risingwavelabs/risingwave:v2.0.1}
services:
risingwave-standalone:
<<: *image
Expand Down
2 changes: 1 addition & 1 deletion docker/docker-compose-with-azblob.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
x-image: &image
image: ${RW_IMAGE:-risingwavelabs/risingwave:v2.0.0}
image: ${RW_IMAGE:-risingwavelabs/risingwave:v2.0.1}
services:
risingwave-standalone:
<<: *image
Expand Down
2 changes: 1 addition & 1 deletion docker/docker-compose-with-gcs.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
x-image: &image
image: ${RW_IMAGE:-risingwavelabs/risingwave:v2.0.0}
image: ${RW_IMAGE:-risingwavelabs/risingwave:v2.0.1}
services:
risingwave-standalone:
<<: *image
Expand Down
2 changes: 1 addition & 1 deletion docker/docker-compose-with-local-fs.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
x-image: &image
image: ${RW_IMAGE:-risingwavelabs/risingwave:v2.0.0}
image: ${RW_IMAGE:-risingwavelabs/risingwave:v2.0.1}
services:
risingwave-standalone:
<<: *image
Expand Down
2 changes: 1 addition & 1 deletion docker/docker-compose-with-obs.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
x-image: &image
image: ${RW_IMAGE:-risingwavelabs/risingwave:v2.0.0}
image: ${RW_IMAGE:-risingwavelabs/risingwave:v2.0.1}
services:
risingwave-standalone:
<<: *image
Expand Down
2 changes: 1 addition & 1 deletion docker/docker-compose-with-oss.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
x-image: &image
image: ${RW_IMAGE:-risingwavelabs/risingwave:v2.0.0}
image: ${RW_IMAGE:-risingwavelabs/risingwave:v2.0.1}
services:
risingwave-standalone:
<<: *image
Expand Down
2 changes: 1 addition & 1 deletion docker/docker-compose-with-s3.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
x-image: &image
image: ${RW_IMAGE:-risingwavelabs/risingwave:v2.0.0}
image: ${RW_IMAGE:-risingwavelabs/risingwave:v2.0.1}
services:
risingwave-standalone:
<<: *image
Expand Down
2 changes: 1 addition & 1 deletion docker/docker-compose-with-sqlite.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
x-image: &image
image: ${RW_IMAGE:-risingwavelabs/risingwave:v2.0.0}
image: ${RW_IMAGE:-risingwavelabs/risingwave:v2.0.1}
services:
risingwave-standalone:
<<: *image
Expand Down
2 changes: 1 addition & 1 deletion docker/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
x-image: &image
image: ${RW_IMAGE:-risingwavelabs/risingwave:v2.0.0}
image: ${RW_IMAGE:-risingwavelabs/risingwave:v2.0.1}
services:
risingwave-standalone:
<<: *image
Expand Down
1 change: 1 addition & 0 deletions e2e_test/batch/catalog/pg_settings.slt.part
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ user sink_decouple
user source_rate_limit
user standard_conforming_strings
user statement_timeout
user streaming_max_parallelism
user streaming_parallelism
user streaming_use_arrangement_backfill
user streaming_use_snapshot_backfill
Expand Down
4 changes: 2 additions & 2 deletions e2e_test/streaming/on_conflict.slt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ statement ok
SET RW_IMPLICIT_FLUSH TO true;

statement ok
create table t1 (v1 int, v2 int, v3 int, primary key(v1)) APPEND ONLY on conflict ignore;
create table t1 (v1 int, v2 int, v3 int, primary key(v1)) APPEND ONLY on conflict do nothing;

statement ok
insert into t1 values (1,4,2), (2,3,3);
Expand Down Expand Up @@ -30,7 +30,7 @@ statement error
create table t2 (v1 int, v2 int, v3 int, primary key(v1)) APPEND ONLY on conflict overwrite;

statement ok
create table t2 (v1 int, v2 int, v3 int, primary key(v1)) on conflict overwrite;
create table t2 (v1 int, v2 int, v3 int, primary key(v1)) on conflict do update full;

statement ok
insert into t2 values (1,4,2), (2,3,3);
Expand Down
4 changes: 2 additions & 2 deletions e2e_test/streaming/with_version_column.slt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ statement error
create table t0 (v1 int, v2 int, v3 int, v4 bool, primary key(v1)) on conflict do update if not null with version column v4;

statement error
create table t0 (v1 int, v2 int, v3 int, v4 int, primary key(v1)) on conflict ignore with version column(v4);
create table t0 (v1 int, v2 int, v3 int, v4 int, primary key(v1)) on conflict do nothing with version column(v4);

statement ok
create table t1 (v1 int, v2 int, v3 int, v4 int, primary key(v1)) on conflict do update if not null with version column(v4);
Expand Down Expand Up @@ -62,7 +62,7 @@ statement ok
SET RW_IMPLICIT_FLUSH TO true;

statement ok
create table t2 (v1 int, v2 int, v3 int, v4 int, primary key(v1)) on conflict overwrite with version column(v4);
create table t2 (v1 int, v2 int, v3 int, v4 int, primary key(v1)) on conflict do update full with version column(v4);

statement ok
insert into t2 values (1,null,2, 4), (2,3,null, 1);
Expand Down
50 changes: 45 additions & 5 deletions grafana/risingwave-dev-dashboard.dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -2442,6 +2442,20 @@ def section_hummock_read(outer_panels):
),
],
),
panels.timeseries_count(
"Safe Version Fetch Count",
"",
[
panels.target(
f"{metric('state_store_safe_version_hit')}",
"",
),
panels.target(
f"{metric('state_store_safe_version_miss')}",
"",
),
],
),
],
)
]
Expand Down Expand Up @@ -3206,6 +3220,10 @@ def section_hummock_manager(outer_panels):
f"{metric('storage_current_version_object_count')}",
"referenced by current version",
),
panels.target(
f"{metric('storage_time_travel_object_count')}",
"referenced by time travel",
),
panels.target(
f"{metric('storage_total_object_count')}",
"all objects (including dangling ones)",
Expand Down Expand Up @@ -3364,6 +3382,33 @@ def section_hummock_manager(outer_panels):
),
],
),
panels.timeseries_latency(
"Time Travel Replay Latency",
"The latency of replaying a hummock version for time travel",
quantile(
lambda quantile, legend: panels.target(
f"histogram_quantile({quantile}, sum(rate({metric('storage_time_travel_version_replay_latency_bucket')}[$__rate_interval])) by (le))",
f"time_travel_version_replay_latency_p{legend}",
),
[50, 90, 99, "max"],
)
+ [
panels.target(
f"rate({metric('storage_time_travel_version_replay_latency_sum')}[$__rate_interval]) / rate({metric('storage_time_travel_version_replay_latency_count')}[$__rate_interval]) > 0",
"time_travel_version_replay_avg",
),
],
),
panels.timeseries_ops(
"Time Travel Replay Ops",
"The frequency of replaying a hummock version for time travel",
[
panels.target(
f"sum(rate({metric('storage_time_travel_version_replay_latency_count')}[$__rate_interval]))",
"time_travel_version_replay_ops",
),
],
),
],
)
]
Expand Down Expand Up @@ -3498,11 +3543,6 @@ def section_grpc_meta_hummock_manager(outer_panels):
"UnpinVersionBefore",
"path='/meta.HummockManagerService/UnpinVersionBefore'",
),
grpc_metrics_target(
panels,
"UnpinSnapshotBefore",
"path='/meta.HummockManagerService/UnpinSnapshotBefore'",
),
grpc_metrics_target(
panels,
"ReportCompactionTasks",
Expand Down
2 changes: 1 addition & 1 deletion grafana/risingwave-dev-dashboard.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions java/com_risingwave_java_binding_Binding.h

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

Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,10 @@ public static void main(String[] args) {
HummockVersion version = metaClient.pinVersion();
Table tableCatalog = metaClient.getTable(dbName, tableName);

int vnodeCount = Binding.vnodeCount();
int vnodeCount = Binding.defaultVnodeCount();
if (tableCatalog.hasMaybeVnodeCount()) {
vnodeCount = tableCatalog.getMaybeVnodeCount();
}

List<Integer> vnodeList = new ArrayList<>();
for (int i = 0; i < vnodeCount; i++) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,11 @@ public static native void tracingSlf4jEvent(

public static native boolean tracingSlf4jEventEnabled(int level);

public static native int vnodeCount();
/**
* Used to get the default number of vnodes for a table, if its `maybeVnodeCount` field is not
* set.
*/
public static native int defaultVnodeCount();

static native long iteratorNewStreamChunk(long pointer);

Expand Down
2 changes: 1 addition & 1 deletion java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
<jackson.version>2.15.0</jackson.version>
<spark_sql.version>3.3.1</spark_sql.version>
<hadoop.version>3.4.0</hadoop.version>
<elasticsearch.version>7.17.19</elasticsearch.version>
<elasticsearch.version>7.17.23</elasticsearch.version>
<opensearch.version>2.11.1</opensearch.version>
<datastax.version>4.15.0</datastax.version>
<flink.version>1.18.0</flink.version>
Expand Down
7 changes: 6 additions & 1 deletion proto/common.proto
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,14 @@ message WorkerSlotMapping {
repeated uint64 data = 2;
}

message BatchQueryCommittedEpoch {
uint64 epoch = 1;
uint64 hummock_version_id = 2;
}

message BatchQueryEpoch {
oneof epoch {
uint64 committed = 1;
BatchQueryCommittedEpoch committed = 1;
uint64 current = 2;
uint64 backup = 3;
uint64 time_travel = 4;
Expand Down
3 changes: 3 additions & 0 deletions proto/hummock.proto
Original file line number Diff line number Diff line change
Expand Up @@ -553,6 +553,8 @@ message VacuumTask {
message FullScanTask {
uint64 sst_retention_time_sec = 1;
optional string prefix = 2;
optional string start_after = 3;
optional uint64 limit = 4;
}

// Cancel compact task
Expand Down Expand Up @@ -588,6 +590,7 @@ message ReportFullScanTaskRequest {
uint64 total_object_count = 2;
// Total size of objects before filtered by conditions specified by FullScanTask.
uint64 total_object_size = 3;
optional string next_start_after = 4;
}

message ReportFullScanTaskResponse {
Expand Down
Loading

0 comments on commit fe8cc7e

Please sign in to comment.