[Bug](load) block call clear_column_data may have ref not equal 1 (#12350)

This commit is contained in:
HappenLee
2022-09-05 20:40:40 +08:00
committed by GitHub
parent 0deee72a63
commit b8e38b9167
2 changed files with 2 additions and 4 deletions

View File

@ -587,9 +587,7 @@ void Block::clear_column_data(int column_size) noexcept {
}
}
for (auto& d : data) {
if (UNLIKELY(d.column->use_count() != 1)) {
LOG(WARNING) << "Ref count of column is " << d.column->use_count();
}
DCHECK(d.column->use_count() == 1);
(*std::move(d.column)).assume_mutable()->clear();
}
}

View File

@ -262,7 +262,7 @@ Status VBrokerScanNode::scanner_scan(const TBrokerScanRange& scan_range, Scanner
return Status::Cancelled("Cancelled");
}
// Queue size Must be smaller than _max_buffered_batches
_block_queue.push_back(block);
_block_queue.push_back(std::move(block));
// Notify reader to process
_queue_reader_cond.notify_one();