Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Metz
oceanbase
提交
e3dd01b9
O
oceanbase
项目概览
Metz
/
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,发现更多精彩内容 >>
提交
e3dd01b9
编写于
7月 27, 2021
作者:
Z
zh0
提交者:
wangzelin.wzl
7月 27, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix local trans core dump
上级
74d02366
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
9 addition
and
13 deletion
+9
-13
src/storage/transaction/ob_trans_part_ctx.cpp
src/storage/transaction/ob_trans_part_ctx.cpp
+1
-6
src/storage/transaction/ob_trans_submit_log_cb.cpp
src/storage/transaction/ob_trans_submit_log_cb.cpp
+5
-4
src/storage/transaction/ob_trans_submit_log_cb.h
src/storage/transaction/ob_trans_submit_log_cb.h
+3
-3
未找到文件。
src/storage/transaction/ob_trans_part_ctx.cpp
浏览文件 @
e3dd01b9
...
...
@@ -278,11 +278,6 @@ void ObPartTransCtx::destroy()
coord_ctx_
=
NULL
;
}
REC_TRANS_TRACE_EXT
(
tlog_
,
destroy
,
OB_ID
(
arg1
),
(
int64_t
)(
&
submit_log_cb_
));
// [DEBUG_ONLY] print the trace and call stack if the clog is invoking the
// txn callback during destroying the participant context
if
(
submit_log_cb_
.
is_callbacking
())
{
TRANS_LOG
(
ERROR
,
"some BUG may happen !!!"
,
K
(
lbt
()),
K
(
*
this
),
K_
(
trans_id
));
}
if
(
mt_ctx_
.
get_ref
()
!=
0
)
{
TRANS_LOG
(
ERROR
,
"memtable_ctx ref not match!!!"
,
K
(
mt_ctx_
.
get_ref
()),
K
(
*
this
),
K
(
mt_ctx_
),
K
(
&
mt_ctx_
));
}
...
...
@@ -9050,7 +9045,7 @@ int ObPartTransCtx::on_clear_(const bool need_response)
TRANS_LOG
(
WARN
,
"submit 2pc commit clear response error"
,
"ret"
,
tmp_ret
,
"context"
,
*
this
);
}
}
else
if
(
enable_new_1pc_
)
{
if
(
NULL
!=
coord_ctx_
)
{
if
(
NULL
!=
coord_ctx_
&&
!
submit_log_cb_
.
is_commit_log_callbacking
()
)
{
trans_service_
->
get_coord_trans_ctx_mgr
().
revert_trans_ctx
(
coord_ctx_
);
coord_ctx_
=
NULL
;
}
...
...
src/storage/transaction/ob_trans_submit_log_cb.cpp
浏览文件 @
e3dd01b9
...
...
@@ -58,7 +58,7 @@ void ObTransSubmitLogCb::reset()
submit_timestamp_
=
0
;
ctx_
=
NULL
;
have_prev_trans_
=
false
;
is_callbacking_
=
false
;
is_c
ommit_log_c
allbacking_
=
false
;
}
int
ObTransSubmitLogCb
::
set_log_type
(
const
int64_t
log_type
)
...
...
@@ -152,7 +152,6 @@ int ObTransSubmitLogCb::on_success(const ObPartitionKey& partition_key, const cl
if
(
OB_FAIL
(
part_ctx
->
get_partition_mgr
()
->
acquire_ctx_ref
(
trans_id
)))
{
TRANS_LOG
(
WARN
,
"get transaction context from hashmap error"
,
K
(
ret
),
K
(
trans_id
));
}
else
{
is_callbacking_
=
true
;
get_ctx
=
ObTimeUtility
::
fast_current_time
();
// batch_commit don't support transaction dependency
const
bool
batch_commit
=
(
have_prev_trans_
?
false
:
batch_committed
);
...
...
@@ -185,7 +184,9 @@ int ObTransSubmitLogCb::on_success(const ObPartitionKey& partition_key, const cl
}
}
}
// need acquire ref before callback
if
(
OB_LOG_TRANS_COMMIT
==
log_type
&&
part_ctx
->
is_enable_new_1pc
())
{
is_commit_log_callbacking_
=
true
;
}
if
(
part_ctx
->
need_to_post_redo_sync_task
(
log_type
))
{
// duplicated table need all lease avaiable replica sync and replay log
if
(
OB_FAIL
(
part_ctx
->
retry_redo_sync_task
(
log_id
,
log_type
,
timestamp
,
true
)))
{
...
...
@@ -197,11 +198,11 @@ int ObTransSubmitLogCb::on_success(const ObPartitionKey& partition_key, const cl
if
(
OB_SUCCESS
!=
(
tmp_ret
=
part_ctx
->
handle_2pc_local_msg_response
(
partition
,
trans_id
,
log_type
)))
{
TRANS_LOG
(
WARN
,
"handle 2pc local msg response error"
,
K
(
tmp_ret
),
K
(
partition
),
K
(
trans_id
),
K
(
log_type
));
}
is_commit_log_callbacking_
=
false
;
}
else
{
// do nothing
}
callback
=
ObTimeUtility
::
fast_current_time
();
is_callbacking_
=
false
;
if
(
OB_SUCCESS
!=
(
tmp_ret
=
part_ctx
->
get_partition_mgr
()
->
release_ctx_ref
(
part_ctx
)))
{
TRANS_LOG
(
WARN
,
"revert transaction context error"
,
"ret"
,
tmp_ret
,
K
(
partition
),
K
(
trans_id
));
ret
=
tmp_ret
;
...
...
src/storage/transaction/ob_trans_submit_log_cb.h
浏览文件 @
e3dd01b9
...
...
@@ -92,9 +92,9 @@ public:
int
on_submit_log_success
(
const
bool
with_need_update_version
,
const
uint64_t
cur_log_id
,
const
int64_t
cur_log_timestamp
);
int
on_submit_log_fail
(
const
int
retcode
);
bool
is_callbacking
()
const
bool
is_c
ommit_log_c
allbacking
()
const
{
return
is_callbacking_
;
return
is_c
ommit_log_c
allbacking_
;
}
private:
...
...
@@ -115,7 +115,7 @@ private:
int64_t
submit_timestamp_
;
ObTransCtx
*
ctx_
;
bool
have_prev_trans_
;
bool
is_callbacking_
;
bool
is_c
ommit_log_c
allbacking_
;
};
}
// namespace transaction
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录