Skip to content

Commit

Permalink
[Debug](pipeline) add log of pipeline scan bug (apache#24804)
Browse files Browse the repository at this point in the history
  • Loading branch information
HappenLee authored Sep 25, 2023
1 parent aea0279 commit 9579634
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
7 changes: 6 additions & 1 deletion be/src/pipeline/exec/operator.h
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,12 @@ class StatefulOperator : public StreamingOperator<OperatorBuilderType> {

if (node->need_more_input_data()) {
_child_block->clear_column_data();
RETURN_IF_ERROR(child->get_block(state, _child_block.get(), _child_source_state));
Status status = child->get_block(state, _child_block.get(), _child_source_state);
if (status.is<777>()) {
LOG(INFO) << "Scan block nullptr error _source_state:" << int(source_state)
<< " query id:" << print_id(state->query_id());
}
RETURN_IF_ERROR(status);
source_state = _child_source_state;
if (_child_block->rows() == 0 && _child_source_state != SourceState::FINISHED) {
return Status::OK();
Expand Down
7 changes: 6 additions & 1 deletion be/src/pipeline/pipeline_task.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,12 @@ Status PipelineTask::execute(bool* eos) {
{
SCOPED_TIMER(_get_block_timer);
_get_block_counter->update(1);
RETURN_IF_ERROR(_root->get_block(_state, block, _data_state));
auto status = _root->get_block(_state, block, _data_state);
if (status.is<777>()) {
LOG(FATAL) << "Scan block nullptr error: can read:" << source_can_read()
<< " query id:" << print_id(_state->query_id());
}
RETURN_IF_ERROR(status);
}
*eos = _data_state == SourceState::FINISHED;

Expand Down
3 changes: 1 addition & 2 deletions be/src/vec/exec/scan/vscan_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -265,8 +265,7 @@ Status VScanNode::get_next(RuntimeState* state, vectorized::Block* block, bool*
}

if (scan_block == nullptr) {
LOG(FATAL) << "Scan block nullptr error _context_queue_id:" << _context_queue_id
<< " context debug string:" << _scanner_ctx->debug_string();
return Status::Error<777>("not pointer in scan pipline");
}
// get scanner's block memory
block->swap(*scan_block);
Expand Down

0 comments on commit 9579634

Please sign in to comment.