Fix memory of DecoderCtx not free as expected
This commit is contained in:
@ -115,7 +115,11 @@ public:
|
|||||||
const int64_t row_cap,
|
const int64_t row_cap,
|
||||||
storage::ObGroupByCell &group_by_cell) const;
|
storage::ObGroupByCell &group_by_cell) const;
|
||||||
OB_INLINE void reserve_reader_memory(bool reserve)
|
OB_INLINE void reserve_reader_memory(bool reserve)
|
||||||
{ reader_->reserve_reader_memory(reserve); }
|
{
|
||||||
|
if (nullptr != reader_) {
|
||||||
|
reader_->reserve_reader_memory(reserve);
|
||||||
|
}
|
||||||
|
}
|
||||||
int64_t get_current_pos() const
|
int64_t get_current_pos() const
|
||||||
{ return current_; }
|
{ return current_; }
|
||||||
VIRTUAL_TO_STRING_KV(K_(can_ignore_multi_version));
|
VIRTUAL_TO_STRING_KV(K_(can_ignore_multi_version));
|
||||||
|
|||||||
@ -548,6 +548,9 @@ int ObCGRowScanner::get_next_rows(uint64_t &count, const uint64_t capacity, cons
|
|||||||
} else {
|
} else {
|
||||||
int64_t batch_size = MIN(iter_param_->op_->get_batch_size(), capacity);
|
int64_t batch_size = MIN(iter_param_->op_->get_batch_size(), capacity);
|
||||||
prefetcher_.recycle_block_data();
|
prefetcher_.recycle_block_data();
|
||||||
|
if (nullptr != micro_scanner_) {
|
||||||
|
micro_scanner_->reserve_reader_memory(false);
|
||||||
|
}
|
||||||
while (OB_SUCC(ret) && count < batch_size) {
|
while (OB_SUCC(ret) && count < batch_size) {
|
||||||
if (OB_FAIL(prefetcher_.prefetch())) {
|
if (OB_FAIL(prefetcher_.prefetch())) {
|
||||||
LOG_WARN("Fail to prefetch micro block", K(ret), K_(prefetcher));
|
LOG_WARN("Fail to prefetch micro block", K(ret), K_(prefetcher));
|
||||||
@ -567,9 +570,6 @@ int ObCGRowScanner::get_next_rows(uint64_t &count, const uint64_t capacity, cons
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (OB_SUCC(ret) && nullptr != micro_scanner_) {
|
|
||||||
micro_scanner_->reserve_reader_memory(false);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (count > 0 && datum_infos_.count() > 0) {
|
if (count > 0 && datum_infos_.count() > 0) {
|
||||||
LOG_TRACE("[COLUMNSTORE] get next rows in cg", K(ret), K_(query_index_range), K_(current), K(count),
|
LOG_TRACE("[COLUMNSTORE] get next rows in cg", K(ret), K_(query_index_range), K_(current), K(count),
|
||||||
|
|||||||
Reference in New Issue
Block a user