Skip to content

Commit 2ef0702

Browse files
perf(table): search global index shards concurrently (#589)
1 parent 32c5a1a commit 2ef0702

4 files changed

Lines changed: 260 additions & 81 deletions

File tree

crates/paimon/src/spec/core_options.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -578,10 +578,10 @@ impl<'a> CoreOptions<'a> {
578578

579579
/// Maximum number of concurrent tasks for global-index I/O, mirroring Java
580580
/// `CoreOptions.GLOBAL_INDEX_THREAD_NUM` (key `global-index.thread-num`,
581-
/// default 32). Used as the fan-out limit for the primary-key vector search
582-
/// (per-bucket and per-exact-file). A value of `1` reproduces strict
583-
/// sequential execution. A non-positive value is a misconfiguration and fails
584-
/// loud rather than being silently clamped.
581+
/// default 32). Used as the per-operation fan-out limit for sorted BTree and
582+
/// bitmap shard reads and for primary-key vector search. A value of `1`
583+
/// reproduces strict sequential execution. A non-positive value is a
584+
/// misconfiguration and fails loud rather than being silently clamped.
585585
pub fn global_index_thread_num(&self) -> crate::Result<usize> {
586586
let value = self
587587
.parse_i64_option(GLOBAL_INDEX_THREAD_NUM_OPTION)?

crates/paimon/src/table/btree_global_index_build_builder.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1231,6 +1231,7 @@ mod tests {
12311231
predicates: &[predicate],
12321232
schema_fields: table.schema().fields(),
12331233
search_mode: GlobalIndexSearchMode::Fast,
1234+
global_index_thread_num: 32,
12341235
btree_fallback_scan_max_size: i64::MAX,
12351236
bitmap_fallback_scan_max_size: i64::MAX,
12361237
next_row_id: snapshot.next_row_id(),
@@ -1359,6 +1360,7 @@ mod tests {
13591360
predicates: &[predicate],
13601361
schema_fields: table.schema().fields(),
13611362
search_mode: GlobalIndexSearchMode::Fast,
1363+
global_index_thread_num: 32,
13621364
btree_fallback_scan_max_size: i64::MAX,
13631365
bitmap_fallback_scan_max_size: i64::MAX,
13641366
next_row_id: snapshot.next_row_id(),

0 commit comments

Comments
 (0)