Skip to content

Commit b9651d3

Browse files
committed
Revert global semaphore
1 parent 7e176c0 commit b9651d3

1 file changed

Lines changed: 0 additions & 8 deletions

File tree

  • datafusion/physical-plan/src/joins/grace_hash_join

datafusion/physical-plan/src/joins/grace_hash_join/exec.rs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -72,17 +72,11 @@ use datafusion_physical_expr_common::physical_expr::fmt_sql;
7272
use futures::StreamExt;
7373
use log::{debug, info};
7474
use std::sync::atomic::{AtomicBool, AtomicUsize, Ordering};
75-
use tokio::sync::Semaphore;
7675

7776
/// Hard-coded seed to ensure hash values from the hash join differ from `RepartitionExec`, avoiding collisions.
7877
const HASH_JOIN_SEED: RandomState =
7978
RandomState::with_seeds('J' as u64, 'O' as u64, 'I' as u64, 'N' as u64);
8079

81-
fn global_partition_semaphore() -> &'static Arc<Semaphore> {
82-
static SEM: OnceLock<Arc<Semaphore>> = OnceLock::new();
83-
SEM.get_or_init(|| Arc::new(Semaphore::new(1)))
84-
}
85-
8680
pub struct GraceHashJoinExec {
8781
/// left (build) side which gets hashed
8882
pub left: Arc<dyn ExecutionPlan>,
@@ -692,8 +686,6 @@ impl ExecutionPlan for GraceHashJoinExec {
692686
let join_metrics_clone = Arc::clone(&join_metrics);
693687
let context_for_partition = Arc::clone(&context);
694688
let spill_fut = OnceFut::new(async move {
695-
let sem = Arc::clone(global_partition_semaphore());
696-
let _partition_permit = sem.acquire_owned().await.unwrap();
697689
// Track memory used during the partitioning phase for this join
698690
let mut left_reservation =
699691
MemoryConsumer::new(format!("GraceHashJoinPartitionLeft[{partition}]"))

0 commit comments

Comments
 (0)