Skip to content

Commit

Permalink
[Bug](runtime-filter) use wake_up_by_downstream to judge early close (a…
Browse files Browse the repository at this point in the history
…pache#41751)

## Proposed changes
Sometimes eos is true, the finish dependency is still not ready. 
Therefore, we need to use wake_up_by_downstream to determine whether it
was closed early.
Otherwise, it will enter the normal rf build process in this case and
generate related errors.
Follow-up : apache#41292
  • Loading branch information
BiteTheDDDDt authored and garenshi committed Oct 16, 2024
1 parent 20420d2 commit 5fe22e4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion be/src/pipeline/exec/hashjoin_build_sink.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include "exprs/bloom_filter_func.h"
#include "pipeline/exec/hashjoin_probe_operator.h"
#include "pipeline/exec/operator.h"
#include "pipeline/pipeline_task.h"
#include "vec/data_types/data_type_nullable.h"
#include "vec/utils/template_helpers.hpp"

Expand Down Expand Up @@ -139,7 +140,7 @@ Status HashJoinBuildSinkLocalState::close(RuntimeState* state, Status exec_statu
return Base::close(state, exec_status);
}

if (!_eos) {
if (state->get_task()->wake_up_by_downstream()) {
RETURN_IF_ERROR(_runtime_filter_slots->send_filter_size(state, 0, _finish_dependency));
RETURN_IF_ERROR(_runtime_filter_slots->ignore_all_filters());
} else {
Expand Down
2 changes: 2 additions & 0 deletions be/src/pipeline/pipeline_task.h
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,8 @@ class PipelineTask {

PipelineId pipeline_id() const { return _pipeline->id(); }

bool wake_up_by_downstream() const { return _wake_up_by_downstream; }

private:
friend class RuntimeFilterDependency;
bool _is_blocked();
Expand Down

0 comments on commit 5fe22e4

Please sign in to comment.