Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
大炮V587
oceanbase
提交
0b7ea211
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,体验更适合开发者的 AI 搜索 >>
提交
0b7ea211
编写于
3月 21, 2023
作者:
O
obdev
提交者:
ob-robot
3月 21, 2023
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix batch_acquire_snapshot timeout bug
上级
26118cf2
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
14 addition
and
1 deletion
+14
-1
src/rootserver/ob_snapshot_info_manager.cpp
src/rootserver/ob_snapshot_info_manager.cpp
+14
-1
未找到文件。
src/rootserver/ob_snapshot_info_manager.cpp
浏览文件 @
0b7ea211
...
...
@@ -14,6 +14,8 @@
#include "ob_snapshot_info_manager.h"
#include "share/ob_snapshot_table_proxy.h"
#include "share/schema/ob_schema_utils.h"
#include "share/ob_ddl_common.h"
#include "common/ob_timeout_ctx.h"
#include "lib/mysqlclient/ob_mysql_transaction.h"
#include "ob_rs_event_history_table_operator.h"
...
...
@@ -67,6 +69,7 @@ int ObSnapshotInfoManager::batch_acquire_snapshot(
ObMySQLTransaction
trans
;
ObSnapshotTableProxy
snapshot_proxy
;
ObSnapshotInfo
snapshot
;
ObTimeoutCtx
timeout_ctx
;
snapshot
.
snapshot_type_
=
snapshot_type
;
snapshot
.
tenant_id_
=
tenant_id
;
snapshot
.
snapshot_scn_
=
snapshot_scn
;
...
...
@@ -76,7 +79,17 @@ int ObSnapshotInfoManager::batch_acquire_snapshot(
ret
=
OB_INVALID_ARGUMENT
;
LOG_WARN
(
"invalid argument"
,
K
(
ret
),
K
(
tablet_ids
.
count
()));
}
else
{
if
(
OB_FAIL
(
trans
.
start
(
&
proxy
,
tenant_id
)))
{
int64_t
rpc_timeout
=
0
;
int64_t
trx_timeout
=
0
;
if
(
OB_FAIL
(
ObDDLUtil
::
get_ddl_rpc_timeout
(
tablet_ids
.
count
(),
rpc_timeout
)))
{
LOG_WARN
(
"get ddl rpc timeout failed"
,
K
(
ret
),
K
(
tablet_ids
.
count
()));
}
else
if
(
OB_FAIL
(
ObDDLUtil
::
get_ddl_tx_timeout
(
tablet_ids
.
count
(),
trx_timeout
)))
{
LOG_WARN
(
"get ddl tx timeout failed"
,
K
(
ret
),
K
(
tablet_ids
.
count
()));
}
else
if
(
OB_FAIL
(
timeout_ctx
.
set_trx_timeout_us
(
trx_timeout
)))
{
LOG_WARN
(
"set trx timeout failed"
,
K
(
ret
),
K
(
trx_timeout
));
}
else
if
(
OB_FAIL
(
timeout_ctx
.
set_timeout
(
rpc_timeout
)))
{
LOG_WARN
(
"set timeout failed"
,
K
(
ret
),
K
(
rpc_timeout
));
}
else
if
(
OB_FAIL
(
trans
.
start
(
&
proxy
,
tenant_id
)))
{
LOG_WARN
(
"fail to start trans"
,
K
(
ret
),
K
(
tenant_id
));
}
else
if
(
OB_FAIL
(
snapshot_proxy
.
batch_add_snapshot
(
trans
,
snapshot_type
,
tenant_id
,
schema_version
,
snapshot
.
snapshot_scn_
,
comment
,
tablet_ids
)))
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录