MCPcopy Create free account
hub / github.com/apache/impala / HandoffToProbesAndWait

Method HandoffToProbesAndWait

be/src/exec/join-builder.cc:126–153  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

124}
125
126void JoinBuilder::HandoffToProbesAndWait(RuntimeState* build_side_state) {
127 DCHECK(is_separate_build_) << "Doesn't make sense for embedded builder.";
128 VLOG(2) << "Initial build ready JoinBuilder (id=" << join_node_id_ << ")";
129 build_side_state->AddCancellationCV(&separate_build_lock_, &build_wakeup_cv_);
130 {
131 unique_lock<mutex> l(separate_build_lock_);
132 ready_to_probe_ = true;
133 VLOG(3) << "JoinBuilder (id=" << join_node_id_ << ")"
134 << " waiting for " << outstanding_probes_ << " probes.";
135 probe_wakeup_cv_.NotifyAll();
136 while (probe_refcount_ > 0
137 || (outstanding_probes_ > 0 && !build_side_state->is_cancelled())) {
138 SCOPED_TIMER(profile_->inactive_timer());
139 VLOG(3) << "JoinBuilder (id=" << join_node_id_ << ") waiting"
140 << " probe_refcount_=" << probe_refcount_
141 << " outstanding_probes_=" << outstanding_probes_
142 << " cancelled=" << build_side_state->is_cancelled();
143 build_wakeup_cv_.Wait(l);
144 }
145 // Don't let probe side pick up the builder when we're going to clean it up.
146 // Query cancellation will propagate to the probe finstance.
147 ready_to_probe_ = !build_side_state->is_cancelled();
148 VLOG(2) << "JoinBuilder (id=" << join_node_id_ << ") all probes complete. "
149 << " probe_refcount_=" << probe_refcount_
150 << " outstanding_probes_=" << outstanding_probes_
151 << " cancelled=" << build_side_state->is_cancelled();
152 }
153}
154
155void JoinBuilder::PublishRuntimeFilters(const std::vector<FilterContext>& filter_ctxs,
156 RuntimeState* runtime_state, float minmax_filter_threshold, int64_t num_build_rows) {

Callers

nothing calls this directly

Calls 5

AddCancellationCVMethod · 0.80
NotifyAllMethod · 0.80
inactive_timerMethod · 0.80
is_cancelledMethod · 0.45
WaitMethod · 0.45

Tested by

no test coverage detected