fix ObTenantAdminMergeRpcProxy init twice
This commit is contained in:
@ -51,7 +51,7 @@ int ObMajorFreezeHelper::major_freeze(
|
|||||||
if (OB_UNLIKELY(!param.is_valid())) {
|
if (OB_UNLIKELY(!param.is_valid())) {
|
||||||
ret = OB_INVALID_ARGUMENT;
|
ret = OB_INVALID_ARGUMENT;
|
||||||
LOG_WARN("invalid argument", K(param), KR(ret));
|
LOG_WARN("invalid argument", K(param), KR(ret));
|
||||||
} else if (OB_FAIL(get_freeze_info(param, freeze_info_array))){
|
} else if (OB_FAIL(get_freeze_info(param, freeze_info_array))) {
|
||||||
LOG_WARN("fail to get tenant id", KR(ret), K(param));
|
LOG_WARN("fail to get tenant id", KR(ret), K(param));
|
||||||
} else {
|
} else {
|
||||||
if (OB_FAIL(do_major_freeze(*param.transport_, freeze_info_array, merge_results))) {
|
if (OB_FAIL(do_major_freeze(*param.transport_, freeze_info_array, merge_results))) {
|
||||||
@ -311,7 +311,6 @@ int ObMajorFreezeHelper::do_one_tenant_admin_merge(
|
|||||||
LOG_WARN("invalid argument", KR(ret), K(tenant_id), K(admin_type));
|
LOG_WARN("invalid argument", KR(ret), K(tenant_id), K(admin_type));
|
||||||
} else {
|
} else {
|
||||||
obrpc::ObTenantAdminMergeRpcProxy proxy;
|
obrpc::ObTenantAdminMergeRpcProxy proxy;
|
||||||
bool force_renew = false;
|
|
||||||
ObAddr leader;
|
ObAddr leader;
|
||||||
obrpc::ObTenantAdminMergeRequest req(tenant_id, admin_type);
|
obrpc::ObTenantAdminMergeRequest req(tenant_id, admin_type);
|
||||||
obrpc::ObTenantAdminMergeResponse resp;
|
obrpc::ObTenantAdminMergeResponse resp;
|
||||||
@ -319,16 +318,16 @@ int ObMajorFreezeHelper::do_one_tenant_admin_merge(
|
|||||||
if (OB_ISNULL(GCTX.location_service_)) {
|
if (OB_ISNULL(GCTX.location_service_)) {
|
||||||
ret = OB_INVALID_ARGUMENT;
|
ret = OB_INVALID_ARGUMENT;
|
||||||
LOG_WARN("invalid GCTX", KR(ret));
|
LOG_WARN("invalid GCTX", KR(ret));
|
||||||
|
} else if (OB_FAIL(proxy.init(&transport))) {
|
||||||
|
LOG_WARN("fail to init", KR(ret));
|
||||||
} else {
|
} else {
|
||||||
const int64_t MAX_RETRY_COUNT = 5;
|
const int64_t MAX_RETRY_COUNT = 5;
|
||||||
bool admin_merge_done = false;
|
bool admin_merge_done = false;
|
||||||
|
|
||||||
for (int64_t i = 0; OB_SUCC(ret) && (!admin_merge_done) && (i < MAX_RETRY_COUNT); ++i) {
|
for (int64_t i = 0; OB_SUCC(ret) && (!admin_merge_done) && (i < MAX_RETRY_COUNT); ++i) {
|
||||||
if (OB_FAIL(GCTX.location_service_->get_leader(GCONF.cluster_id,
|
if (OB_FAIL(GCTX.location_service_->get_leader_with_retry_until_timeout(GCONF.cluster_id,
|
||||||
tenant_id, share::SYS_LS, force_renew, leader))) {
|
tenant_id, share::SYS_LS, leader))) {
|
||||||
LOG_WARN("fail to get ls locaiton leader", KR(ret), K(tenant_id), K(force_renew));
|
LOG_WARN("fail to get ls locaiton leader", KR(ret), K(tenant_id));
|
||||||
} else if (OB_FAIL(proxy.init(&transport))) {
|
|
||||||
LOG_WARN("fail to init", KR(ret));
|
|
||||||
} else if (OB_FAIL(proxy.to(leader)
|
} else if (OB_FAIL(proxy.to(leader)
|
||||||
.trace_time(true)
|
.trace_time(true)
|
||||||
.max_process_handler_time(MAX_PROCESS_TIME_US)
|
.max_process_handler_time(MAX_PROCESS_TIME_US)
|
||||||
|
|||||||
@ -660,12 +660,12 @@ int ObMajorMergeScheduler::update_merge_status(const int64_t expected_epoch)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
int ObMajorMergeScheduler::update_global_merge_info_after_merge(const int64_t expected_epaoch)
|
int ObMajorMergeScheduler::update_global_merge_info_after_merge(const int64_t expected_epoch)
|
||||||
{
|
{
|
||||||
int ret = OB_SUCCESS;
|
int ret = OB_SUCCESS;
|
||||||
// need update global merge_status
|
// need update global merge_status
|
||||||
if (OB_FAIL(zone_merge_mgr_->update_global_merge_info_after_merge(expected_epaoch))) {
|
if (OB_FAIL(zone_merge_mgr_->update_global_merge_info_after_merge(expected_epoch))) {
|
||||||
LOG_WARN("fail to update global merge info after merge", KR(ret), K_(tenant_id), K(expected_epaoch));
|
LOG_WARN("fail to update global merge info after merge", KR(ret), K_(tenant_id), K(expected_epoch));
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -58,9 +58,9 @@ int ObExprToOutfileRow::calc_result_typeN(ObExprResType &type,
|
|||||||
// the result is only used to select into outile, so we don't care the accurate length
|
// the result is only used to select into outile, so we don't care the accurate length
|
||||||
type.set_length(OB_MAX_ROW_LENGTH);
|
type.set_length(OB_MAX_ROW_LENGTH);
|
||||||
// field_str
|
// field_str
|
||||||
types[PARAM_FIELD].set_calc_type(ObVarcharType);
|
types[PARAM_FIELD].set_calc_type(ObVarcharType);
|
||||||
types[PARAM_FIELD].set_calc_collation_type(types[PARAM_FIELD].get_collation_type());
|
types[PARAM_FIELD].set_calc_collation_type(types[PARAM_FIELD].get_collation_type());
|
||||||
// line_str
|
// line_str
|
||||||
types[PARAM_LINE].set_calc_type(ObVarcharType);
|
types[PARAM_LINE].set_calc_type(ObVarcharType);
|
||||||
types[PARAM_LINE].set_calc_collation_type(types[PARAM_LINE].get_collation_type());
|
types[PARAM_LINE].set_calc_collation_type(types[PARAM_LINE].get_collation_type());
|
||||||
// closed_cht
|
// closed_cht
|
||||||
@ -75,9 +75,9 @@ int ObExprToOutfileRow::calc_result_typeN(ObExprResType &type,
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
int ObExprToOutfileRow::cg_expr(ObExprCGCtx &, const ObRawExpr &, ObExpr &expr) const
|
int ObExprToOutfileRow::cg_expr(ObExprCGCtx &, const ObRawExpr &, ObExpr &expr) const
|
||||||
{
|
{
|
||||||
int ret = OB_SUCCESS;
|
int ret = OB_SUCCESS;
|
||||||
CK(expr.arg_cnt_ > PARAM_SELECT_ITEM);
|
CK(expr.arg_cnt_ > PARAM_SELECT_ITEM);
|
||||||
if (OB_SUCC(ret)) {
|
if (OB_SUCC(ret)) {
|
||||||
for (int i = PARAM_FIELD; i < PARAM_SELECT_ITEM; i++) {
|
for (int i = PARAM_FIELD; i < PARAM_SELECT_ITEM; i++) {
|
||||||
@ -175,9 +175,9 @@ int ObExprToOutfileRow::to_outfile_str(const ObExpr &expr, ObEvalCtx &ctx, ObDat
|
|||||||
int64_t pos = 0;
|
int64_t pos = 0;
|
||||||
char *buf = out_info->buf_;
|
char *buf = out_info->buf_;
|
||||||
int64_t buf_len = out_info->buf_len_;
|
int64_t buf_len = out_info->buf_len_;
|
||||||
for (int64_t i = PARAM_SELECT_ITEM; OB_SUCC(ret) && i < expr.arg_cnt_; i++) {
|
for (int64_t i = PARAM_SELECT_ITEM; OB_SUCC(ret) && i < expr.arg_cnt_; i++) {
|
||||||
ObDatum &v = expr.locate_param_datum(ctx, i);
|
ObDatum &v = expr.locate_param_datum(ctx, i);
|
||||||
const ObObjMeta &obj_meta = expr.args_[i]->obj_meta_;
|
const ObObjMeta &obj_meta = expr.args_[i]->obj_meta_;
|
||||||
ObObj obj;
|
ObObj obj;
|
||||||
OZ(v.to_obj(obj, obj_meta, expr.args_[i]->obj_datum_map_));
|
OZ(v.to_obj(obj, obj_meta, expr.args_[i]->obj_datum_map_));
|
||||||
OZ(print_field(buf, buf_len, pos, obj, *out_info));
|
OZ(print_field(buf, buf_len, pos, obj, *out_info));
|
||||||
|
|||||||
Reference in New Issue
Block a user