Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix](sort) fix coredump by uncaught exception。 DO NOT MERGE #46952

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion be/src/vec/core/sort_cursor.h
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ struct BlockSupplierSortCursorImpl : public MergeSortCursorImpl {
} else if (!status.ok()) {
// Currently, a known error status is emitted when sender
// close recei
throw std::runtime_error(status.msg());
throw Exception(status.code(), status.msg());
}
return false;
}
Expand Down
6 changes: 5 additions & 1 deletion be/src/vec/runtime/vsorted_run_merger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ Status VSortedRunMerger::prepare(const vector<BlockSupplier>& input_runs) {
return Status::OK();
}

Status VSortedRunMerger::get_next(Block* output_block, bool* eos) {
Status VSortedRunMerger::_get_next_internal(Block* output_block, bool* eos) {
ScopedTimer<MonotonicStopWatch> timer(_get_next_timer);
// Only have one receive data queue of data, no need to do merge and
// copy the data of block.
Expand Down Expand Up @@ -213,6 +213,10 @@ Status VSortedRunMerger::get_next(Block* output_block, bool* eos) {
return Status::OK();
}

Status VSortedRunMerger::get_next(Block* output_block, bool* eos) {
RETURN_IF_CATCH_EXCEPTION(return _get_next_internal(output_block, eos));
}

bool VSortedRunMerger::next_heap(MergeSortCursor& current) {
if (!current->isLast()) {
current->next();
Expand Down
2 changes: 2 additions & 0 deletions be/src/vec/runtime/vsorted_run_merger.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ class VSortedRunMerger {
/// In pipeline engine, return false if need to read one more block from sender.
bool next_heap(MergeSortCursor& current);
bool has_next_block(MergeSortCursor& current);

Status _get_next_internal(Block* output_block, bool* eos);
};

} // namespace vectorized
Expand Down
Loading