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

@ -866,6 +866,8 @@ int ObTableScanOp::inner_close()
if (MY_SPEC.batch_scan_flag_ ? NULL == bnl_iters_ : NULL == result_) {
// this is normal case, so we need NOT set ret or LOG_WARN.
} else if (OB_FAIL(ctx_.remove_iter(result_))) {
LOG_WARN("fail to remove iter", K(ret));
} else {
if (OB_FAIL(fill_storage_feedback_info())) {
LOG_WARN("failed to fill storage feedback info", K(ret));
@ -1482,6 +1484,14 @@ inline int ObTableScanOp::do_table_scan(bool is_rescan, bool need_prepare /*=tru
LOG_DEBUG("debug trans", K(*scan_param_.trans_desc_), K(ret));
}
}
if (OB_SUCC(ret)) {
if (OB_ISNULL(result_)) {
ret = OB_ERR_UNEXPECTED;
LOG_WARN("result should not be NULL", K(ret), K(scan_param_));
} else if (OB_FAIL(ctx_.push_back_iter(result_))) {
LOG_WARN("failed to push back iter", K(ret), K(scan_param_));
}
}
}
return ret;
}