Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Metz
oceanbase
提交
fcdc7e33
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看板
提交
fcdc7e33
编写于
12月 03, 2021
作者:
G
gjw2284740
提交者:
LINGuanRen
12月 03, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[hotpots] refine some codes
上级
1613b26c
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
21 addition
and
20 deletion
+21
-20
src/storage/memtable/mvcc/ob_mvcc_row.cpp
src/storage/memtable/mvcc/ob_mvcc_row.cpp
+13
-11
src/storage/transaction/ob_trans_service.cpp
src/storage/transaction/ob_trans_service.cpp
+8
-9
未找到文件。
src/storage/memtable/mvcc/ob_mvcc_row.cpp
浏览文件 @
fcdc7e33
...
@@ -1233,17 +1233,19 @@ int ObMvccRow::lock_for_write(const ObMemtableKey* key, ObIMvccCtx& ctx)
...
@@ -1233,17 +1233,19 @@ int ObMvccRow::lock_for_write(const ObMemtableKey* key, ObIMvccCtx& ctx)
}
}
}
}
// remote sql?
if
(
OB_TRY_LOCK_ROW_CONFLICT
==
ret
)
{
const
int64_t
is_remote_sql
=
// remote sql?
(
static_cast
<
ObMemtableCtx
&>
(
ctx
).
get_trans_ctx
()
->
get_trans_id
().
get_server
()
!=
OBSERVER
.
get_self
());
const
int64_t
is_remote_sql
=
if
(
OB_SUCCESS
!=
(
tmp_ret
=
get_global_lock_wait_mgr
().
post_lock
(
ret
,
(
static_cast
<
ObMemtableCtx
&>
(
ctx
).
get_trans_ctx
()
->
get_trans_id
().
get_server
()
!=
OBSERVER
.
get_self
());
row_lock_
,
if
(
OB_SUCCESS
!=
(
tmp_ret
=
get_global_lock_wait_mgr
().
post_lock
(
ret
,
*
key
,
row_lock_
,
query_abs_lock_wait_timeout
,
*
key
,
is_remote_sql
,
query_abs_lock_wait_timeout
,
total_trans_node_cnt_
,
is_remote_sql
,
ctx
.
is_can_elr
(),
total_trans_node_cnt_
,
uid
)))
{}
ctx
.
is_can_elr
(),
uid
)))
{}
}
const
bool
enable_perf_event
=
GCONF
.
enable_perf_event
;
const
bool
enable_perf_event
=
GCONF
.
enable_perf_event
;
ctx
.
set_lock_wait_start_ts
(
0
);
ctx
.
set_lock_wait_start_ts
(
0
);
if
(
OB_SUCC
(
ret
))
{
if
(
OB_SUCC
(
ret
))
{
...
...
src/storage/transaction/ob_trans_service.cpp
浏览文件 @
fcdc7e33
...
@@ -501,7 +501,7 @@ int ObTransService::half_stmt_commit(const ObTransDesc& trans_desc, const ObPart
...
@@ -501,7 +501,7 @@ int ObTransService::half_stmt_commit(const ObTransDesc& trans_desc, const ObPart
}
else
{
}
else
{
part_ctx
=
static_cast
<
ObPartTransCtx
*>
(
ctx
);
part_ctx
=
static_cast
<
ObPartTransCtx
*>
(
ctx
);
if
(
OB_FAIL
(
part_ctx
->
half_stmt_commit
()))
{
if
(
OB_FAIL
(
part_ctx
->
half_stmt_commit
()))
{
TRANS_LOG
(
WARN
,
"half stmt commit error"
,
K
(
ret
),
K
(
trans_desc
),
K
(
partition
)
,
K
(
*
part_ctx
)
);
TRANS_LOG
(
WARN
,
"half stmt commit error"
,
K
(
ret
),
K
(
trans_desc
),
K
(
partition
));
}
}
(
void
)
part_trans_ctx_mgr_
.
revert_trans_ctx
(
ctx
);
(
void
)
part_trans_ctx_mgr_
.
revert_trans_ctx
(
ctx
);
}
}
...
@@ -1409,7 +1409,7 @@ int ObTransService::start_stmt(const ObStmtParam& stmt_param, ObTransDesc& trans
...
@@ -1409,7 +1409,7 @@ int ObTransService::start_stmt(const ObStmtParam& stmt_param, ObTransDesc& trans
if
(
OB_TRANS_XA_BRANCH_FAIL
==
ret
)
{
if
(
OB_TRANS_XA_BRANCH_FAIL
==
ret
)
{
TRANS_LOG
(
INFO
,
"xa trans has terminated"
,
K
(
ret
),
K
(
trans_desc
));
TRANS_LOG
(
INFO
,
"xa trans has terminated"
,
K
(
ret
),
K
(
trans_desc
));
}
else
{
}
else
{
TRANS_LOG
(
WARN
,
"unexpected scheduler for xa execution"
,
K
(
ret
)
,
K
(
*
sche_ctx
)
);
TRANS_LOG
(
WARN
,
"unexpected scheduler for xa execution"
,
K
(
ret
));
}
}
}
else
if
(
OB_SUCCESS
!=
(
ret
=
sche_ctx
->
xa_try_global_lock
(
xid
)))
{
}
else
if
(
OB_SUCCESS
!=
(
ret
=
sche_ctx
->
xa_try_global_lock
(
xid
)))
{
// ret = OB_TRANS_STMT_NEED_RETRY;
// ret = OB_TRANS_STMT_NEED_RETRY;
...
@@ -4188,10 +4188,10 @@ int ObTransService::can_replay_redo_(
...
@@ -4188,10 +4188,10 @@ int ObTransService::can_replay_redo_(
need_replay_redo
=
true
;
need_replay_redo
=
true
;
}
else
{
}
else
{
need_replay_redo
=
false
;
need_replay_redo
=
false
;
TRANS_LOG
(
INFO
,
"no need to replay this big row redo log"
,
K
(
meta
)
,
K
(
*
part_ctx
)
);
TRANS_LOG
(
INFO
,
"no need to replay this big row redo log"
,
K
(
meta
));
}
}
}
else
{
}
else
{
TRANS_LOG
(
ERROR
,
"invalid row flag, unexpected error"
,
K
(
meta
)
,
K
(
*
part_ctx
)
);
TRANS_LOG
(
ERROR
,
"invalid row flag, unexpected error"
,
K
(
meta
));
ret
=
OB_ERR_UNEXPECTED
;
ret
=
OB_ERR_UNEXPECTED
;
}
}
}
}
...
@@ -4934,7 +4934,7 @@ int ObTransService::replay(const ObPartitionKey& partition, const char* logbuf,
...
@@ -4934,7 +4934,7 @@ int ObTransService::replay(const ObPartitionKey& partition, const char* logbuf,
}
else
{
}
else
{
part_ctx
=
static_cast
<
ObPartTransCtx
*>
(
ctx
);
part_ctx
=
static_cast
<
ObPartTransCtx
*>
(
ctx
);
if
(
OB_UNLIKELY
(
OB_SUCCESS
!=
(
tmp_ret
=
part_ctx
->
get_memtable_ctx
()
->
sub_trans_end
(
false
))))
{
if
(
OB_UNLIKELY
(
OB_SUCCESS
!=
(
tmp_ret
=
part_ctx
->
get_memtable_ctx
()
->
sub_trans_end
(
false
))))
{
TRANS_LOG
(
WARN
,
"sub trans abort error"
,
K
(
tmp_ret
),
K
(
partition
),
K
(
log_id
)
,
K
(
*
part_ctx
)
);
TRANS_LOG
(
WARN
,
"sub trans abort error"
,
K
(
tmp_ret
),
K
(
partition
),
K
(
log_id
));
}
}
(
void
)
part_trans_ctx_mgr_
.
revert_trans_ctx
(
ctx
);
(
void
)
part_trans_ctx_mgr_
.
revert_trans_ctx
(
ctx
);
}
}
...
@@ -8267,8 +8267,7 @@ int ObTransService::handle_elr_callback_(const int64_t task_type, const ObPartit
...
@@ -8267,8 +8267,7 @@ int ObTransService::handle_elr_callback_(const int64_t task_type, const ObPartit
K
(
partition
),
K
(
partition
),
K
(
trans_id
),
K
(
trans_id
),
K
(
prev_or_next_trans_id
),
K
(
prev_or_next_trans_id
),
K
(
state
),
K
(
state
));
K
(
*
part_ctx
));
}
}
(
void
)
part_trans_ctx_mgr_
.
revert_trans_ctx
(
ctx
);
(
void
)
part_trans_ctx_mgr_
.
revert_trans_ctx
(
ctx
);
}
}
...
@@ -8813,7 +8812,7 @@ int ObTransService::xa_rollback_all_changes(ObTransDesc& trans_desc, const ObStm
...
@@ -8813,7 +8812,7 @@ int ObTransService::xa_rollback_all_changes(ObTransDesc& trans_desc, const ObStm
TRANS_LOG
(
WARN
,
"invalid argument"
,
K
(
ret
),
K
(
trans_desc
));
TRANS_LOG
(
WARN
,
"invalid argument"
,
K
(
ret
),
K
(
trans_desc
));
}
else
if
(
OB_ISNULL
(
sche_ctx
))
{
}
else
if
(
OB_ISNULL
(
sche_ctx
))
{
ret
=
OB_ERR_UNEXPECTED
;
ret
=
OB_ERR_UNEXPECTED
;
TRANS_LOG
(
WARN
,
"xa trans sche ctx is null"
,
K
(
ret
),
K
(
*
sche_ctx
),
K
(
trans_desc
));
TRANS_LOG
(
WARN
,
"xa trans sche ctx is null"
,
K
(
ret
),
K
(
trans_desc
));
}
else
if
(
OB_FAIL
(
trans_desc
.
set_cur_stmt_expired_time
(
expired_time
)))
{
}
else
if
(
OB_FAIL
(
trans_desc
.
set_cur_stmt_expired_time
(
expired_time
)))
{
TRANS_LOG
(
WARN
,
"set statement expired time error"
,
KR
(
ret
),
K
(
trans_desc
),
K
(
expired_time
));
TRANS_LOG
(
WARN
,
"set statement expired time error"
,
KR
(
ret
),
K
(
trans_desc
),
K
(
expired_time
));
}
else
if
(
sche_ctx
->
is_xa_tightly_coupled
())
{
}
else
if
(
sche_ctx
->
is_xa_tightly_coupled
())
{
...
@@ -8823,7 +8822,7 @@ int ObTransService::xa_rollback_all_changes(ObTransDesc& trans_desc, const ObStm
...
@@ -8823,7 +8822,7 @@ int ObTransService::xa_rollback_all_changes(ObTransDesc& trans_desc, const ObStm
if
(
OB_TRANS_XA_BRANCH_FAIL
==
ret
)
{
if
(
OB_TRANS_XA_BRANCH_FAIL
==
ret
)
{
TRANS_LOG
(
INFO
,
"xa trans has terminated"
,
K
(
ret
),
K
(
trans_desc
));
TRANS_LOG
(
INFO
,
"xa trans has terminated"
,
K
(
ret
),
K
(
trans_desc
));
}
else
{
}
else
{
TRANS_LOG
(
WARN
,
"unexpected scheduler for xa execution"
,
K
(
ret
)
,
K
(
*
sche_ctx
)
);
TRANS_LOG
(
WARN
,
"unexpected scheduler for xa execution"
,
K
(
ret
));
}
}
}
else
{
}
else
{
int64_t
retry_times
=
0
;
int64_t
retry_times
=
0
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录