Fix das task retry issue introduce by transfer.

This commit is contained in:
obdev
2023-07-04 10:42:04 +00:00
committed by ob-robot
parent 2e9990564c
commit d43333d322
2 changed files with 10 additions and 2 deletions

View File

@ -657,7 +657,7 @@ OB_INLINE int ObTableScanOp::create_one_das_task(ObDASTabletLoc *tablet_loc)
scan_op->set_scan_ctdef(&MY_CTDEF.scan_ctdef_);
scan_op->set_scan_rtdef(&tsc_rtdef_.scan_rtdef_);
scan_op->set_can_part_retry(nullptr == tsc_rtdef_.scan_rtdef_.sample_info_
&& ctx_.get_my_session()->is_user_session());
&& can_partition_retry());
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
@ -3163,7 +3163,7 @@ int ObGlobalIndexLookupOpImpl::process_data_table_rowkey()
das_scan_op = static_cast<ObDASScanOp*>(tmp_op);
das_scan_op->set_scan_ctdef(get_lookup_ctdef());
das_scan_op->set_scan_rtdef(lookup_rtdef);
das_scan_op->set_can_part_retry(table_scan_op_->get_exec_ctx().get_my_session()->is_user_session());
das_scan_op->set_can_part_retry(table_scan_op_->can_partition_retry());
}
}
if (OB_SUCC(ret)) {

View File

@ -391,6 +391,14 @@ public:
const common::ObTabletID &scan_tablet_id,
const common::ObArrayWrap<share::schema::ObColDesc> &rowkey_descs,
common::ObNewRange &new_range);
OB_INLINE bool can_partition_retry()
{
return (
ctx_.get_my_session()->is_user_session() &&
! ObStmt::is_dml_write_stmt(ctx_.get_physical_plan_ctx()->get_phy_plan()->get_stmt_type())
);
}
protected:
// Get GI task then update location_idx and $cur_access_tablet_
// NOTE: set $iter_end_ if no task found.