File tree Expand file tree Collapse file tree
datafusion/physical-plan/src/joins/grace_hash_join Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -58,22 +58,13 @@ use parking_lot::Mutex;
5858const MAX_REPARTITION_PARTITIONS : usize = 256 ;
5959/// Upper bound for concurrent spill chunk read-ahead when loading partitions.
6060/// Keep this modest to avoid competing with the main partition budget.
61- const SPILL_READAHEAD_BYTES : usize = 256 * 1024 * 1024 ;
61+ const SPILL_READAHEAD_BYTES : usize = 64 * 1024 * 1024 ;
6262/// Below this size we avoid further repartitioning to keep file counts under control.
6363const MIN_REPARTITION_BYTES : usize = 16 * 1024 * 1024 ;
6464
65- /// Derive a prefetch cap for the next partition to avoid runaway memory use.
66- /// We cap at half of the current budget but never exceed 512 MiB, and disable
67- /// prefetch entirely for very small budgets to avoid churn.
68- fn prefetch_cap_bytes ( current_limit : usize ) -> usize {
69- const PREFETCH_HARD_CAP : usize = 512 * 1024 * 1024 ;
70- const PREFETCH_MIN_BYTES : usize = 8 * 1024 * 1024 ;
71- let cap = ( current_limit / 2 ) . min ( PREFETCH_HARD_CAP ) ;
72- if cap < PREFETCH_MIN_BYTES {
73- 0
74- } else {
75- cap
76- }
65+ /// Prefetch is disabled to avoid overlapping memory use with the active partition.
66+ fn prefetch_cap_bytes ( _current_limit : usize ) -> usize {
67+ 0
7768}
7869
7970enum GraceJoinState {
You can’t perform that action at this time.
0 commit comments