fix hash join do not clear last batch memory leads OOM
This commit is contained in:
committed by
ob-robot
parent
0ac8dd7d1b
commit
b047318590
@ -673,6 +673,7 @@ public:
|
||||
class IterationAge
|
||||
{
|
||||
public:
|
||||
IterationAge() : age_(0) {}
|
||||
int64_t get(void) const { return age_; }
|
||||
void inc(void) { age_ += 1; }
|
||||
private:
|
||||
|
||||
@ -1250,8 +1250,8 @@ int ObHashJoinOp::build_hash_table_for_nest_loop(int64_t &num_left_rows)
|
||||
int64_t memory_bound = std::max(remain_data_memory_size_,
|
||||
hj_batch->get_chunk_row_store().get_max_blk_size());
|
||||
const int64_t row_bound = hash_table.nbuckets_ / 2;
|
||||
ObChunkDatumStore::IterationAge iter_age;
|
||||
hj_batch->set_iteration_age(iter_age);
|
||||
hj_batch->set_iteration_age(iter_age_);
|
||||
iter_age_.inc();
|
||||
while (OB_SUCC(ret)) {
|
||||
int64_t read_size = 0;
|
||||
if (OB_FAIL(hj_batch->get_next_batch(left_stored_rows,
|
||||
@ -1740,8 +1740,8 @@ int ObHashJoinOp::build_hash_table_in_memory(int64_t &num_left_rows)
|
||||
// do nothing
|
||||
} else {
|
||||
PartHashJoinTable &hash_table = *cur_hash_table_;
|
||||
ObChunkDatumStore::IterationAge iter_age;
|
||||
hj_batch->set_iteration_age(iter_age);
|
||||
hj_batch->set_iteration_age(iter_age_);
|
||||
iter_age_.inc();
|
||||
while (OB_SUCC(ret)) {
|
||||
int64_t read_size = 0;
|
||||
if (OB_FAIL(hj_batch->get_next_batch(left_stored_rows,
|
||||
|
||||
@ -1269,6 +1269,7 @@ private:
|
||||
*/
|
||||
bool skip_left_null_;
|
||||
bool skip_right_null_;
|
||||
ObChunkDatumStore::IterationAge iter_age_;
|
||||
};
|
||||
|
||||
inline int ObHashJoinOp::init_mem_context(uint64_t tenant_id)
|
||||
|
||||
Reference in New Issue
Block a user