Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[introspection] Set the minimal query parallelism to 2 #1586

Merged
merged 1 commit into from
Jun 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions crates/storage-query-datafusion/src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
// the Business Source License, use of this software will be governed
// by the Apache License, Version 2.0.

use std::cmp::max;
use std::fmt::Debug;
use std::sync::Arc;

Expand Down Expand Up @@ -168,9 +169,14 @@ impl QueryContext {
// build the session
//
let mut session_config = SessionConfig::new();
if let Some(p) = default_parallelism {
session_config = session_config.with_target_partitions(p)
}

// TODO: this value affects the number of partitions created by datafusion while
// executing a query. Setting this to 1 causes the SymmetricHashJoin to fail
// which we use for some of the queries.
// Resolving this issue is tracked at https:/restatedev/restate/issues/1585
let parallelism = default_parallelism.unwrap_or(2);
session_config = session_config.with_target_partitions(max(2, parallelism));

session_config = session_config
.with_allow_symmetric_joins_without_pruning(true)
.with_information_schema(true)
Expand Down
Loading