cherry-pick from 3_1_x_release to 3.1_opensource_release

This commit is contained in:
yy0
2021-07-26 10:42:25 +08:00
committed by wangzelin.wzl
parent f2f91f98c6
commit 821da37d63
29 changed files with 318 additions and 368 deletions

View File

@ -557,6 +557,17 @@ int ObTableScanStoreRowIterator::switch_iterator(const int64_t range_array_idx)
return ret;
}
int ObTableScanStoreRowIterator::release_table_ref()
{
int ret = OB_SUCCESS;
if (NULL != main_iter_) {
if (OB_FAIL(main_iter_->release_table_ref())) {
STORAGE_LOG(WARN, "failed to release table ref", K(ret));
}
}
return ret;
}
ObTableScanRangeArrayRowIterator::ObTableScanRangeArrayRowIterator()
: is_inited_(false), row_iter_(NULL), cur_row_(NULL), curr_range_array_idx_(0), is_reverse_scan_(false)
{}
@ -644,6 +655,16 @@ int ObTableScanRangeArrayRowIterator::set_range_array_idx(const int64_t range_ar
}
return ret;
}
int ObTableScanRangeArrayRowIterator::release_table_ref()
{
int ret = OB_SUCCESS;
if (OB_FAIL(row_iter_->release_table_ref())) {
STORAGE_LOG(WARN, "failed to refresh table on demand", K(ret));
}
return ret;
}
constexpr const char ObTableScanIterIterator::LABEL[];
constexpr const char ObTableScanIterator::LABEL[];
@ -728,6 +749,15 @@ void ObTableScanIterIterator::reset()
is_reverse_scan_ = false;
}
int ObTableScanIterIterator::release_table_ref()
{
int ret = OB_SUCCESS;
if (OB_FAIL(store_row_iter_.release_table_ref())) {
STORAGE_LOG(WARN, "failed to refresh table on demand", K(ret));
}
return ret;
}
ObTableScanIterator::ObTableScanIterator()
: ObNewRowIterator(ObNewRowIterator::ObTableScanIterator), iter_(), row_iter_(NULL)
{}
@ -795,6 +825,15 @@ void ObTableScanIterator::reset()
row_iter_ = NULL;
}
int ObTableScanIterator::release_table_ref()
{
int ret = OB_SUCCESS;
if (OB_FAIL(iter_.release_table_ref())) {
STORAGE_LOG(WARN, "failed to refresh table on demand", K(ret));
}
return ret;
}
ObTableScanNewRowIterator::ObTableScanNewRowIterator(ObNewIterIterator& iter) : iter_(iter), row_iter_(NULL)
{}