fix: fix das retry failed to refresh tablet location

This commit is contained in:
obdev
2023-08-28 10:40:50 +00:00
committed by ob-robot
parent 587e41a93c
commit abfff06726
4 changed files with 9 additions and 1 deletions

View File

@ -570,6 +570,7 @@ OB_DEF_SERIALIZE(ObDASCtx)
} }
OB_UNIS_ENCODE(flags_); OB_UNIS_ENCODE(flags_);
OB_UNIS_ENCODE(snapshot_); OB_UNIS_ENCODE(snapshot_);
OB_UNIS_ENCODE(location_router_);
return ret; return ret;
} }
@ -599,6 +600,7 @@ OB_DEF_DESERIALIZE(ObDASCtx)
if (OB_SUCC(ret) && OB_FAIL(rebuild_tablet_loc_reference())) { if (OB_SUCC(ret) && OB_FAIL(rebuild_tablet_loc_reference())) {
LOG_WARN("rebuild tablet loc reference failed", K(ret)); LOG_WARN("rebuild tablet loc reference failed", K(ret));
} }
OB_UNIS_DECODE(location_router_);
return ret; return ret;
} }
@ -612,6 +614,7 @@ OB_DEF_SERIALIZE_SIZE(ObDASCtx)
} }
OB_UNIS_ADD_LEN(flags_); OB_UNIS_ADD_LEN(flags_);
OB_UNIS_ADD_LEN(snapshot_); OB_UNIS_ADD_LEN(snapshot_);
OB_UNIS_ADD_LEN(location_router_);
return len; return len;
} }
} // namespace sql } // namespace sql

View File

@ -1255,5 +1255,7 @@ int ObDASLocationRouter::get_external_table_ls_location(ObLSLocation &location)
return ret; return ret;
} }
OB_SERIALIZE_MEMBER(ObDASLocationRouter, all_tablet_list_);
} // namespace sql } // namespace sql
} // namespace oceanbase } // namespace oceanbase

View File

@ -275,6 +275,7 @@ private:
class ObDASLocationRouter class ObDASLocationRouter
{ {
OB_UNIS_VERSION(1);
friend class ObDASCtx; friend class ObDASCtx;
typedef common::ObList<VirtualSvrPair, common::ObIAllocator> VirtualSvrList; typedef common::ObList<VirtualSvrPair, common::ObIAllocator> VirtualSvrList;
public: public:
@ -338,6 +339,8 @@ private:
int last_errno_; int last_errno_;
int cur_errno_; int cur_errno_;
int64_t retry_cnt_; int64_t retry_cnt_;
// NOTE: Only all_tablet_list_ needs to be serialized and send to other server to perform das remote execution;
// And other members will be collected by execution server self, No need to perform serialization;
ObList<common::ObTabletID, common::ObIAllocator> all_tablet_list_; ObList<common::ObTabletID, common::ObIAllocator> all_tablet_list_;
ObList<common::ObTabletID, common::ObIAllocator> succ_tablet_list_; ObList<common::ObTabletID, common::ObIAllocator> succ_tablet_list_;
VirtualSvrList virtual_server_list_; VirtualSvrList virtual_server_list_;

View File

@ -290,7 +290,7 @@ int ObDataAccessService::retry_das_task(ObDASRef &das_ref, ObIDASTaskOp &task_op
} else if (OB_FAIL(execute_dist_das_task(das_ref, das_task_wrapper, false))) { } else if (OB_FAIL(execute_dist_das_task(das_ref, das_task_wrapper, false))) {
LOG_WARN("execute dist DAS task failed", K(ret)); LOG_WARN("execute dist DAS task failed", K(ret));
} }
LOG_INFO("[DAS RETRY] Retry completing the DAS Task", KPC(task_op.get_tablet_loc())); LOG_INFO("[DAS RETRY] Retry completing the DAS Task", KPC(task_op.get_tablet_loc()), KR(ret));
} }
task_op.errcode_ = ret; task_op.errcode_ = ret;
retry_continue = (OB_SUCCESS != ret); retry_continue = (OB_SUCCESS != ret);