Skip to content

Commit

Permalink
perf(stream): concurrently fetch row from storage and refill cache (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
kwannoel authored Jan 7, 2025
1 parent efbeec1 commit 2497760
Show file tree
Hide file tree
Showing 9 changed files with 708 additions and 298 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

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

10 changes: 10 additions & 0 deletions src/common/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1150,6 +1150,11 @@ pub struct StreamingDeveloperConfig {
/// When true, all jdbc sinks with connector='jdbc' and jdbc.url="jdbc:postgresql://..."
/// will be switched from jdbc postgresql sinks to rust native (connector='postgres') sinks.
pub switch_jdbc_pg_to_native: bool,

/// Configure the system-wide cache row cardinality of hash join.
/// For example, if this is set to 1000, it means we can have at most 1000 rows in cache.
#[serde(default = "default::developer::streaming_hash_join_entry_state_max_rows")]
pub hash_join_entry_state_max_rows: usize,
}

/// The subsections `[batch.developer]`.
Expand Down Expand Up @@ -2113,6 +2118,11 @@ pub mod default {
pub fn switch_jdbc_pg_to_native() -> bool {
false
}

pub fn streaming_hash_join_entry_state_max_rows() -> usize {
// NOTE(kwannoel): This is just an arbitrary number.
30000
}
}

pub use crate::system_param::default as system;
Expand Down
1 change: 1 addition & 0 deletions src/config/example.toml
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ stream_exchange_connection_pool_size = 1
stream_enable_auto_schema_change = true
stream_enable_shared_source = true
stream_switch_jdbc_pg_to_native = false
stream_hash_join_entry_state_max_rows = 30000

[storage]
share_buffers_sync_parallelism = 1
Expand Down
1 change: 1 addition & 0 deletions src/stream/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ workspace-hack = { path = "../workspace-hack" }
assert_matches = "1"
criterion = { workspace = true, features = ["async_tokio", "async"] }
expect-test = "1"
pretty_assertions = "1"
risingwave_expr_impl = { workspace = true }
risingwave_hummock_sdk = { workspace = true }
risingwave_hummock_test = { path = "../storage/hummock_test", features = [
Expand Down
Loading

0 comments on commit 2497760

Please sign in to comment.