Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
大炮V587
oceanbase
提交
d765e76d
O
oceanbase
项目概览
大炮V587
/
oceanbase
与 Fork 源项目一致
Fork自
oceanbase / oceanbase
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
oceanbase
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
d765e76d
编写于
3月 14, 2023
作者:
O
obdev
提交者:
ob-robot
3月 14, 2023
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix heart beat remove bug
上级
b50d965b
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
30 addition
and
16 deletion
+30
-16
deps/oblib/src/lib/utility/ob_tracepoint.h
deps/oblib/src/lib/utility/ob_tracepoint.h
+1
-0
src/storage/ddl/ob_ddl_server_client.cpp
src/storage/ddl/ob_ddl_server_client.cpp
+29
-16
未找到文件。
deps/oblib/src/lib/utility/ob_tracepoint.h
浏览文件 @
d765e76d
...
@@ -599,6 +599,7 @@ class EventTable
...
@@ -599,6 +599,7 @@ class EventTable
EN_DDL_RELEASE_DDL_KV_FAIL
=
514
,
EN_DDL_RELEASE_DDL_KV_FAIL
=
514
,
EN_DDL_REPORT_CHECKSUM_FAIL
=
515
,
EN_DDL_REPORT_CHECKSUM_FAIL
=
515
,
EN_DDL_REPORT_REPLICA_BUILD_STATUS_FAIL
=
516
,
EN_DDL_REPORT_REPLICA_BUILD_STATUS_FAIL
=
516
,
EN_DDL_DIRECT_LOAD_WAIT_TABLE_LOCK_FAIL
=
517
,
// 600-700 For PX use
// 600-700 For PX use
EN_PX_SQC_EXECUTE_FAILED
=
600
,
EN_PX_SQC_EXECUTE_FAILED
=
600
,
...
...
src/storage/ddl/ob_ddl_server_client.cpp
浏览文件 @
d765e76d
...
@@ -42,17 +42,26 @@ int ObDDLServerClient::create_hidden_table(const obrpc::ObCreateHiddenTableArg &
...
@@ -42,17 +42,26 @@ int ObDDLServerClient::create_hidden_table(const obrpc::ObCreateHiddenTableArg &
LOG_WARN
(
"failed to create hidden table"
,
KR
(
ret
),
K
(
arg
));
LOG_WARN
(
"failed to create hidden table"
,
KR
(
ret
),
K
(
arg
));
}
else
if
(
OB_FAIL
(
OB_DDL_HEART_BEAT_TASK_CONTAINER
.
set_register_task_id
(
res
.
task_id_
,
res
.
tenant_id_
)))
{
}
else
if
(
OB_FAIL
(
OB_DDL_HEART_BEAT_TASK_CONTAINER
.
set_register_task_id
(
res
.
task_id_
,
res
.
tenant_id_
)))
{
LOG_WARN
(
"failed to set register task id"
,
K
(
ret
),
K
(
res
));
LOG_WARN
(
"failed to set register task id"
,
K
(
ret
),
K
(
res
));
}
else
if
(
OB_FAIL
(
wait_task_reach_pending
(
arg
.
tenant_id_
,
res
.
task_id_
,
*
GCTX
.
sql_proxy_
,
session
)))
{
}
LOG_WARN
(
"failed to wait table lock. remove register task id and abort redef table task."
,
K
(
ret
),
K
(
arg
),
K
(
res
));
if
(
OB_SUCC
(
ret
))
{
int
tmp_ret
=
OB_SUCCESS
;
if
(
OB_FAIL
(
wait_task_reach_pending
(
arg
.
tenant_id_
,
res
.
task_id_
,
*
GCTX
.
sql_proxy_
,
session
)))
{
obrpc
::
ObAbortRedefTableArg
abort_redef_table_arg
;
LOG_WARN
(
"failed to wait table lock. remove register task id and abort redef table task."
,
K
(
ret
),
K
(
arg
),
K
(
res
));
abort_redef_table_arg
.
task_id_
=
res
.
task_id_
;
abort_redef_table_arg
.
tenant_id_
=
arg
.
tenant_id_
;
if
(
OB_TMP_FAIL
(
abort_redef_table
(
abort_redef_table_arg
,
session
)))
{
LOG_WARN
(
"failed to abort redef table"
,
K
(
tmp_ret
),
K
(
abort_redef_table_arg
));
}
}
if
(
OB_TMP_FAIL
(
heart_beat_clear
(
res
.
task_id_
)))
{
#ifdef ERRSIM
LOG_WARN
(
"heart beat clear failed"
,
K
(
tmp_ret
),
K
(
res
.
task_id_
));
if
(
OB_SUCC
(
ret
))
{
ret
=
OB_E
(
common
::
EventTable
::
EN_DDL_DIRECT_LOAD_WAIT_TABLE_LOCK_FAIL
)
OB_SUCCESS
;
LOG_INFO
(
"wait table lock failed errsim"
,
K
(
ret
));
}
#endif
if
(
OB_FAIL
(
ret
))
{
int
tmp_ret
=
OB_SUCCESS
;
obrpc
::
ObAbortRedefTableArg
abort_redef_table_arg
;
abort_redef_table_arg
.
task_id_
=
res
.
task_id_
;
abort_redef_table_arg
.
tenant_id_
=
arg
.
tenant_id_
;
if
(
OB_TMP_FAIL
(
abort_redef_table
(
abort_redef_table_arg
,
session
)))
{
LOG_WARN
(
"failed to abort redef table"
,
K
(
tmp_ret
),
K
(
abort_redef_table_arg
));
}
// abort_redef_table() function last step must remove heart_beat task, so there is no need to call heart_beat_clear()
}
}
}
}
return
ret
;
return
ret
;
...
@@ -81,9 +90,7 @@ int ObDDLServerClient::start_redef_table(const obrpc::ObStartRedefTableArg &arg,
...
@@ -81,9 +90,7 @@ int ObDDLServerClient::start_redef_table(const obrpc::ObStartRedefTableArg &arg,
if
(
OB_TMP_FAIL
(
abort_redef_table
(
abort_redef_table_arg
,
session
)))
{
if
(
OB_TMP_FAIL
(
abort_redef_table
(
abort_redef_table_arg
,
session
)))
{
LOG_WARN
(
"failed to abort redef table"
,
K
(
tmp_ret
),
K
(
abort_redef_table_arg
));
LOG_WARN
(
"failed to abort redef table"
,
K
(
tmp_ret
),
K
(
abort_redef_table_arg
));
}
}
if
(
OB_TMP_FAIL
(
heart_beat_clear
(
res
.
task_id_
)))
{
// abort_redef_table() function last step must remove heart_beat task, so there is no need to call heart_beat_clear()
LOG_WARN
(
"heart beat clear failed"
,
K
(
tmp_ret
),
K
(
res
.
task_id_
));
}
}
}
return
ret
;
return
ret
;
}
}
...
@@ -163,9 +170,15 @@ int ObDDLServerClient::abort_redef_table(const obrpc::ObAbortRedefTableArg &arg,
...
@@ -163,9 +170,15 @@ int ObDDLServerClient::abort_redef_table(const obrpc::ObAbortRedefTableArg &arg,
if
(
OB_ENTRY_NOT_EXIST
==
ret
)
{
if
(
OB_ENTRY_NOT_EXIST
==
ret
)
{
ret
=
OB_SUCCESS
;
ret
=
OB_SUCCESS
;
}
}
if
(
OB_FAIL
(
ret
))
{
if
(
OB_SUCC
(
ret
))
{
}
else
if
(
OB_FAIL
(
sql
::
ObDDLExecutorUtil
::
wait_ddl_finish
(
arg
.
tenant_id_
,
arg
.
task_id_
,
session
,
common_rpc_proxy
)))
{
if
(
OB_FAIL
(
sql
::
ObDDLExecutorUtil
::
wait_ddl_finish
(
arg
.
tenant_id_
,
arg
.
task_id_
,
session
,
common_rpc_proxy
)))
{
LOG_WARN
(
"wait ddl finish failed"
,
K
(
ret
),
K
(
arg
.
tenant_id_
),
K
(
arg
.
task_id_
));
if
(
OB_CANCELED
==
ret
)
{
ret
=
OB_SUCCESS
;
LOG_INFO
(
"ddl abort success"
,
K_
(
arg
.
task_id
));
}
else
{
LOG_WARN
(
"wait ddl finish failed"
,
K
(
ret
),
K
(
arg
.
tenant_id_
),
K
(
arg
.
task_id_
));
}
}
}
}
int
tmp_ret
=
OB_SUCCESS
;
int
tmp_ret
=
OB_SUCCESS
;
if
(
OB_TMP_FAIL
(
heart_beat_clear
(
arg
.
task_id_
)))
{
if
(
OB_TMP_FAIL
(
heart_beat_clear
(
arg
.
task_id_
)))
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录