[CP] [FIX] checkout timeout_ts when iterate virtual table

This commit is contained in:
ZenoWang
2024-02-05 06:46:49 +00:00
committed by ob-robot
parent 164d426eb4
commit 6047da89a3
2 changed files with 8 additions and 1 deletions

View File

@ -368,7 +368,13 @@ int ObVirtualTableIterator::get_next_row(ObNewRow *&row)
int ret = OB_SUCCESS;
ObNewRow *cur_row = NULL;
row_calc_buf_.reuse();
if (OB_FAIL(inner_get_next_row(cur_row))) {
const int64_t abs_timeout_ts = get_scan_param()->timeout_;
if (ObClockGenerator::getClock() > abs_timeout_ts) {
ret = OB_TIMEOUT;
LOG_WARN("iterate virtual table row timeout", KR(ret), KTIME(abs_timeout_ts));
} else if (OB_FAIL(THIS_WORKER.check_status())) {
LOG_WARN("iterate virtual table row failed", KR(ret), KTIME(abs_timeout_ts));
} else if (OB_FAIL(inner_get_next_row(cur_row))) {
if (OB_UNLIKELY(OB_ITER_END != ret)) {
LOG_WARN("fail to inner get next row", K(ret), KPC(scan_param_));
}