[Debug](scan) Add debug log for find p0 scan coredump in pipeline (#24202)

This commit is contained in:
HappenLee
2023-09-12 12:17:44 +08:00
committed by GitHub
parent b602369482
commit dbf509edc0
3 changed files with 14 additions and 1 deletions

View File

@ -176,6 +176,15 @@ public:
}
}
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;

View File

@ -131,7 +131,7 @@ public:
bool no_schedule();
std::string debug_string();
virtual std::string debug_string();
RuntimeState* state() { return _state; }

View File

@ -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));