Skip to content

Commit

Permalink
[Bug](runtime-filter) check rf dependency is set and fix wrong throw …
Browse files Browse the repository at this point in the history
…status (#44838)

### What problem does this PR solve?
1. check rf dependency is set
2. fix wrong throw status, introduced by
#44697
3. catch throw exception on buildsink::close
  • Loading branch information
BiteTheDDDDt authored Dec 2, 2024
1 parent ed4f7fb commit 8514df8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions be/src/exprs/runtime_filter.h
Original file line number Diff line number Diff line change
Expand Up @@ -355,8 +355,9 @@ class IRuntimeFilter {
const std::shared_ptr<pipeline::CountedFinishDependency>& dependency);

int64_t get_synced_size() const {
if (_synced_size == -1) {
throw Status::InternalError("sync filter size meet error, filter: {}", debug_string());
if (_synced_size == -1 || !_dependency) {
throw Exception(doris::ErrorCode::INTERNAL_ERROR,
"sync filter size meet error, filter: {}", debug_string());
}
return _synced_size;
}
Expand Down
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 @@ -156,7 +156,8 @@ Status HashJoinBuildSinkLocalState::close(RuntimeState* state, Status exec_statu
uint64_t hash_table_size = block ? block->rows() : 0;
{
SCOPED_TIMER(_runtime_filter_init_timer);
RETURN_IF_ERROR(_runtime_filter_slots->init_filters(state, hash_table_size));
RETURN_IF_ERROR_OR_CATCH_EXCEPTION(
_runtime_filter_slots->init_filters(state, hash_table_size));
RETURN_IF_ERROR(_runtime_filter_slots->ignore_filters(state));
}
if (hash_table_size > 1) {
Expand Down

0 comments on commit 8514df8

Please sign in to comment.