Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
oceanbase
oceanbase
提交
8a11d33b
O
oceanbase
项目概览
oceanbase
/
oceanbase
10 个月 前同步成功
通知
261
Star
6084
Fork
1301
代码
文件
提交
分支
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 搜索 >>
提交
8a11d33b
编写于
4月 23, 2024
作者:
C
chinaxing
提交者:
ob-robot
4月 23, 2024
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix busy log_cb not return when log sync success callback and TxCtx is exiting
上级
14961cf9
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
15 addition
and
18 deletion
+15
-18
src/storage/tx/ob_trans_part_ctx.cpp
src/storage/tx/ob_trans_part_ctx.cpp
+13
-17
src/storage/tx/ob_tx_2pc_ctx_impl.cpp
src/storage/tx/ob_tx_2pc_ctx_impl.cpp
+2
-1
未找到文件。
src/storage/tx/ob_trans_part_ctx.cpp
浏览文件 @
8a11d33b
...
...
@@ -427,11 +427,6 @@ void ObPartTransCtx::reset_log_cb_list_(common::ObDList<ObTxLogCb> &cb_list)
ObTxLogCb
*
cb
=
NULL
;
while
(
OB_NOT_NULL
(
cb
=
cb_list
.
remove_first
()))
{
const
bool
is_dynamic
=
cb
->
is_dynamic
();
if
(
OB_NOT_NULL
(
cb
->
get_tx_data
()))
{
ObTxData
*
tx_data
=
cb
->
get_tx_data
();
ctx_tx_data_
.
free_tmp_tx_data
(
tx_data
);
cb
->
set_tx_data
(
nullptr
);
}
if
(
!
is_dynamic
)
{
cb
->
reset
();
}
else
{
...
...
@@ -664,8 +659,8 @@ int ObPartTransCtx::handle_timeout(const int64_t delay)
}
}
// retry submit abort log
if
(
!
is_follower_
()
// retry submit abort log
for local tx abort
if
(
!
is_follower_
()
&&
is_local_tx_
()
&&
get_upstream_state
()
==
ObTxState
::
ABORT
&&
get_upstream_state
()
!=
get_downstream_state
())
{
if
(
OB_FAIL
(
compensate_abort_log_
()))
{
...
...
@@ -2222,11 +2217,12 @@ int ObPartTransCtx::on_success(ObTxLogCb *log_cb)
return_log_cb_
(
log_cb
);
}
else
if
(
is_exiting_
)
{
// the TxCtx maybe has been killed forcedly by background GC thread
// because the log_cb process skipped, here don't free log_cb directly
// the cleanup routine in destroy will handle, see `reset_log_cb_list_`
// the log_cb process has been skipped
if
(
sub_state_
.
is_force_abort
())
{
TRANS_LOG
(
WARN
,
"ctx has been aborted forcedly before log sync successfully"
,
KPC
(
this
));
print_trace_log_
();
busy_cbs_
.
remove
(
log_cb
);
return_log_cb_
(
log_cb
);
}
else
{
TRANS_LOG_RET
(
ERROR
,
OB_ERR_UNEXPECTED
,
"callback was missed when tx ctx exiting"
,
KPC
(
log_cb
),
KPC
(
this
));
print_trace_log_
();
...
...
@@ -2321,7 +2317,7 @@ int ObPartTransCtx::on_success_ops_(ObTxLogCb *log_cb)
// do nothing
}
else
if
(
ObTxLogType
::
TX_MULTI_DATA_SOURCE_LOG
==
log_type
)
{
share
::
SCN
notify_redo_scn
=
log_cb
->
get_first_part_scn
().
is_valid
()
?
log_cb
->
get_first_part_scn
()
:
log_ts
;
log_cb
->
get_first_part_scn
().
is_valid
()
?
log_cb
->
get_first_part_scn
()
:
log_ts
;
if
(
OB_FAIL
(
log_cb
->
get_mds_range
().
move_from_cache_to_arr
(
mds_cache_
,
exec_info_
.
multi_data_source_
)))
{
TRANS_LOG
(
WARN
,
"move from mds cache to durable arr failed"
,
K
(
ret
));
...
...
@@ -2490,8 +2486,8 @@ int ObPartTransCtx::on_success_ops_(ObTxLogCb *log_cb)
if
(
OB_FAIL
(
ctx_tx_data_
.
set_end_log_ts
(
log_ts
)))
{
TRANS_LOG
(
WARN
,
"set end log ts failed"
,
K
(
ret
));
}
else
if
(
OB_FAIL
(
mds_cache_
.
generate_final_notify_array
(
exec_info_
.
multi_data_source_
,
true
/*need_merge_cache*/
,
true
/*allow_log_overflow*/
)))
{
true
/*need_merge_cache*/
,
true
/*allow_log_overflow*/
)))
{
TRANS_LOG
(
WARN
,
"gen total mds array failed"
,
K
(
ret
));
}
else
if
(
OB_FAIL
(
notify_data_source_
(
type
,
log_ts
,
false
,
mds_cache_
.
get_final_notify_array
())))
{
TRANS_LOG
(
WARN
,
"notify data source failed"
,
KR
(
ret
),
K
(
*
this
));
...
...
@@ -2526,11 +2522,11 @@ int ObPartTransCtx::on_success_ops_(ObTxLogCb *log_cb)
}
}
REC_TRANS_TRACE_EXT
(
tlog_
,
log_sync_succ_cb
,
OB_ID
(
ret
),
ret
,
OB_ID
(
log_type
),
(
void
*
)
log_type
,
OB_ID
(
t
),
log_ts
,
OB_ID
(
offset
),
log_lsn
,
OB_ID
(
ref
),
get_ref
());
OB_ID
(
ret
),
ret
,
OB_ID
(
log_type
),
(
void
*
)
log_type
,
OB_ID
(
t
),
log_ts
,
OB_ID
(
offset
),
log_lsn
,
OB_ID
(
ref
),
get_ref
());
}
return
ret
;
}
...
...
src/storage/tx/ob_tx_2pc_ctx_impl.cpp
浏览文件 @
8a11d33b
...
...
@@ -364,7 +364,8 @@ int ObPartTransCtx::do_clear()
if
(
is_root
())
{
// response scheduler after all participant commit log sycned
check_and_response_scheduler_
(
ObTxState
::
CLEAR
,
OB_SUCCESS
);
const
int
result
=
ctx_tx_data_
.
get_state
()
==
ObTxCommitData
::
COMMIT
?
OB_SUCCESS
:
OB_TRANS_ROLLBACKED
;
check_and_response_scheduler_
(
ObTxState
::
CLEAR
,
result
);
}
// currently do nothing
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录