Skip to content

Commit

Permalink
[Debug](scan) Add debug log for find p0 scan coredump in pipeline (ap…
Browse files Browse the repository at this point in the history
  • Loading branch information
HappenLee authored Sep 12, 2023
1 parent b602369 commit dbf509e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
9 changes: 9 additions & 0 deletions be/src/vec/exec/scan/pip_scanner_context.h
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,15 @@ class PipScannerContext : public vectorized::ScannerContext {
}
}

std::string debug_string() override {
auto res = ScannerContext::debug_string();
for (int i = 0; i < _blocks_queues.size(); ++i) {
res += " queue " + std::to_string(i) + ":size " +
std::to_string(_blocks_queues[i].size_approx());
}
return res;
}

private:
int _next_queue_to_feed = 0;
std::vector<moodycamel::ConcurrentQueue<vectorized::BlockUPtr>> _blocks_queues;
Expand Down
2 changes: 1 addition & 1 deletion be/src/vec/exec/scan/scanner_context.h
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ class ScannerContext {

bool no_schedule();

std::string debug_string();
virtual std::string debug_string();

RuntimeState* state() { return _state; }

Expand Down
4 changes: 4 additions & 0 deletions be/src/vec/exec/scan/vscan_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,10 @@ Status VScanNode::get_next(RuntimeState* state, vectorized::Block* block, bool*
return Status::OK();
}

if (scan_block == nullptr) {
LOG(FATAL) << "Scan block nullptr error _context_queue_id:" << _context_queue_id
<< " context debug string:" << _scanner_ctx->debug_string();
}
// get scanner's block memory
block->swap(*scan_block);
_scanner_ctx->return_free_block(std::move(scan_block));
Expand Down

0 comments on commit dbf509e

Please sign in to comment.