[CP] Add in_rescan flag in TableScanOp and disable retry when in_rescan
This commit is contained in:
parent
f6a6cdd802
commit
85888c990d
@ -258,7 +258,7 @@ int ObDataAccessService::retry_das_task(ObDASRef &das_ref, ObIDASTaskOp &task_op
|
||||
bool need_retry = false;
|
||||
retry_func(das_ref, task_op, need_retry);
|
||||
LOG_INFO("[DAS RETRY] check if need tablet level retry",
|
||||
KR(task_op.errcode_), K(need_retry),
|
||||
KR(task_op.errcode_), K(need_retry), K(task_op.task_flag_),
|
||||
"retry_cnt", location_router.get_retry_cnt(),
|
||||
KPC(task_op.get_tablet_loc()));
|
||||
if (need_retry &&
|
||||
|
@ -608,6 +608,7 @@ ObTableScanOp::ObTableScanOp(ObExecContext &exec_ctx, const ObOpSpec &spec, ObOp
|
||||
range_buffer_idx_(0),
|
||||
group_size_(0),
|
||||
max_group_size_(0),
|
||||
in_rescan_(false),
|
||||
global_index_lookup_op_(NULL),
|
||||
spat_index_()
|
||||
{
|
||||
@ -659,6 +660,7 @@ OB_INLINE int ObTableScanOp::create_one_das_task(ObDASTabletLoc *tablet_loc)
|
||||
scan_op->set_scan_rtdef(&tsc_rtdef_.scan_rtdef_);
|
||||
scan_op->set_can_part_retry(nullptr == tsc_rtdef_.scan_rtdef_.sample_info_
|
||||
&& can_partition_retry());
|
||||
scan_op->set_inner_rescan(in_rescan_);
|
||||
tsc_rtdef_.scan_rtdef_.table_loc_->is_reading_ = true;
|
||||
if (!MY_SPEC.is_index_global_ && MY_CTDEF.lookup_ctdef_ != nullptr) {
|
||||
//is local index lookup, need to set the lookup ctdef to the das scan op
|
||||
@ -1496,6 +1498,7 @@ int ObTableScanOp::fill_storage_feedback_info()
|
||||
int ObTableScanOp::inner_rescan()
|
||||
{
|
||||
int ret = OB_SUCCESS;
|
||||
in_rescan_ = true;
|
||||
if (OB_FAIL(ObOperator::inner_rescan())) {
|
||||
LOG_WARN("failed to exec inner rescan");
|
||||
} else if (MY_SPEC.is_global_index_back()) {
|
||||
@ -1598,7 +1601,6 @@ int ObTableScanOp::local_iter_rescan()
|
||||
}
|
||||
}
|
||||
if (OB_SUCC(ret)) {
|
||||
scan_op->set_inner_rescan(true);
|
||||
if (OB_FAIL(cherry_pick_range_by_tablet_id(scan_op))) {
|
||||
LOG_WARN("prune query range by partition id failed", K(ret));
|
||||
} else if (OB_FAIL(init_das_group_range(0, group_size_))) {
|
||||
|
@ -540,6 +540,7 @@ protected:
|
||||
// for equal_query_range opt end
|
||||
int64_t group_size_;
|
||||
int64_t max_group_size_;
|
||||
bool in_rescan_;
|
||||
ObGlobalIndexLookupOpImpl *global_index_lookup_op_;
|
||||
ObSpatialIndexCache spat_index_;
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user