fix table location renew for sync tablet auto increment cache

This commit is contained in:
Charles0429 2023-09-20 15:24:44 +00:00 committed by ob-robot
parent ae9d5e72ff
commit 52c2509840
2 changed files with 7 additions and 3 deletions

View File

@ -2033,7 +2033,7 @@ int ObDDLRedefinitionTask::get_child_task_ids(char *buf, int64_t len)
}
ObSyncTabletAutoincSeqCtx::ObSyncTabletAutoincSeqCtx()
: is_inited_(false), is_synced_(false), src_tenant_id_(OB_INVALID_ID), dst_tenant_id_(OB_INVALID_ID), orig_src_tablet_ids_(),
: is_inited_(false), is_synced_(false), need_renew_location_(false), src_tenant_id_(OB_INVALID_ID), dst_tenant_id_(OB_INVALID_ID), orig_src_tablet_ids_(),
src_tablet_ids_(), dest_tablet_ids_(), autoinc_params_()
{}
@ -2094,6 +2094,9 @@ int ObSyncTabletAutoincSeqCtx::sync()
}
}
}
if (OB_LS_NOT_EXIST == ret || is_location_service_renew_error(ret)) {
need_renew_location_ = true;
}
return ret;
}
@ -2180,7 +2183,7 @@ int ObSyncTabletAutoincSeqCtx::call_and_process_all_tablet_autoinc_seqs(P &proxy
target_tenant_id,
tmp_autoinc_params,
rpc_timeout,
force_renew,
need_renew_location_,
true/*by src tablet*/,
ls_to_tablet_map))) {
LOG_WARN("failed to build ls to tabmap", K(ret));
@ -2190,7 +2193,7 @@ int ObSyncTabletAutoincSeqCtx::call_and_process_all_tablet_autoinc_seqs(P &proxy
target_tenant_id,
autoinc_params_,
rpc_timeout,
force_renew,
need_renew_location_,
false/*by src tablet*/,
ls_to_tablet_map))) {
LOG_WARN("failed to build ls to tabmap", K(ret));

View File

@ -102,6 +102,7 @@ private:
static const int64_t MAP_BUCKET_NUM = 1024;
bool is_inited_;
bool is_synced_;
bool need_renew_location_;
uint64_t src_tenant_id_;
uint64_t dst_tenant_id_;
ObSEArray<ObTabletID, 1> orig_src_tablet_ids_;