Skip to content

Commit 40190cb

Browse files
authored
chore: enable distributed recluster (#18644)
* fix * fix
1 parent dec1921 commit 40190cb

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/query/expression/src/utils/block_thresholds.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ impl BlockThresholds {
152152

153153
let bytes_per_block = total_bytes.div_ceil(block_num_by_compressed);
154154
// Adjust the number of blocks based on block size thresholds.
155-
let max_bytes_per_block = (4 * self.min_bytes_per_block).min(400 * 1024 * 1024);
155+
let max_bytes_per_block = self.max_bytes_per_block.min(400 * 1024 * 1024);
156156
let min_bytes_per_block = (self.min_bytes_per_block / 2).min(50 * 1024 * 1024);
157157
let block_nums = if bytes_per_block > max_bytes_per_block {
158158
// Case 1: If the block size is too bigger.

src/query/expression/tests/it/block_thresholds.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ fn test_calc_rows_for_recluster() {
102102

103103
// Case 1: If the block size is too bigger.
104104
let result = t.calc_rows_for_recluster(4_000, 30_000_000, 600_000);
105-
assert_eq!(result, 400);
105+
assert_eq!(result, 267);
106106

107107
// Case 2: If the block size is too smaller.
108108
let result = t.calc_rows_for_recluster(4_000, 2_000_000, 600_000);

src/query/settings/src/settings_default.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -926,7 +926,7 @@ impl DefaultSettings {
926926
range: Some(SettingRange::Numeric(2..=u64::MAX)),
927927
}),
928928
("enable_distributed_recluster", DefaultSettingValue {
929-
value: UserSettingValue::UInt64(0),
929+
value: UserSettingValue::UInt64(1),
930930
desc: "Enable distributed execution of table recluster.",
931931
mode: SettingMode::Both,
932932
scope: SettingScope::Both,

0 commit comments

Comments
 (0)