Make Das task fast false when das task under partition wise nlj

This commit is contained in:
obdev
2023-08-10 10:54:48 +00:00
committed by ob-robot
parent 4091110a6e
commit 4163502241
3 changed files with 15 additions and 1 deletions

View File

@ -202,6 +202,9 @@ public:
ObIDASTaskResult *get_op_result() const { return op_result_; } ObIDASTaskResult *get_op_result() const { return op_result_; }
void set_op_result(ObIDASTaskResult *op_result) { op_result_ = op_result; } void set_op_result(ObIDASTaskResult *op_result) { op_result_ = op_result; }
bool get_gi_above_and_rescan() { return gi_above_and_rescan_; }
void set_gi_above_and_rescan(bool flag) { gi_above_and_rescan_ = flag; }
protected: protected:
int start_das_task(); int start_das_task();
int end_das_task(); int end_das_task();
@ -224,7 +227,8 @@ protected:
uint16_t in_part_retry_ : 1; uint16_t in_part_retry_ : 1;
uint16_t in_stmt_retry_ : 1; uint16_t in_stmt_retry_ : 1;
uint16_t need_switch_param_ : 1; //need to switch param in gi table rescan, this parameter has been deprecated uint16_t need_switch_param_ : 1; //need to switch param in gi table rescan, this parameter has been deprecated
uint16_t status_reserved_ : 12; uint16_t gi_above_and_rescan_ : 1; //For partition wise nlj, We need to disable das task retry.
uint16_t status_reserved_ : 11;
}; };
}; };
transaction::ObTxDesc *trans_desc_; //trans desc,事务是全局信息,由RPC框架管理,这里不维护其内存 transaction::ObTxDesc *trans_desc_; //trans desc,事务是全局信息,由RPC框架管理,这里不维护其内存

View File

@ -261,6 +261,13 @@ int ObDataAccessService::retry_das_task(ObDASRef &das_ref, ObIDASTaskOp &task_op
KR(task_op.errcode_), K(need_retry), KR(task_op.errcode_), K(need_retry),
"retry_cnt", location_router.get_retry_cnt(), "retry_cnt", location_router.get_retry_cnt(),
KPC(task_op.get_tablet_loc())); KPC(task_op.get_tablet_loc()));
if (need_retry &&
task_op.get_gi_above_and_rescan() &&
location_router.get_retry_cnt() > 100) { //hard code retry 100 times.
//When das scan under px gi with transfor case, we need to disable das retry.
need_retry = false;
retry_continue = false;
}
if (need_retry) { if (need_retry) {
task_op.in_part_retry_ = true; task_op.in_part_retry_ = true;
location_router.set_last_errno(task_op.get_errcode()); location_router.set_last_errno(task_op.get_errcode());

View File

@ -1594,6 +1594,9 @@ int ObTableScanOp::local_iter_rescan()
} }
} }
if (OB_SUCC(ret)) { if (OB_SUCC(ret)) {
if (MY_SPEC.gi_above_) {
scan_op->set_gi_above_and_rescan(true);
}
if (OB_FAIL(cherry_pick_range_by_tablet_id(scan_op))) { if (OB_FAIL(cherry_pick_range_by_tablet_id(scan_op))) {
LOG_WARN("prune query range by partition id failed", K(ret)); LOG_WARN("prune query range by partition id failed", K(ret));
} else if (OB_FAIL(init_das_group_range(0, group_size_))) { } else if (OB_FAIL(init_das_group_range(0, group_size_))) {