Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
大炮V587
oceanbase
提交
74a77359
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,发现更多精彩内容 >>
提交
74a77359
编写于
3月 15, 2023
作者:
C
chinaxing
提交者:
ob-robot
3月 15, 2023
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
return ob_not_master if txn was killed by LS GC routine
上级
e04e3c94
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
25 addition
and
13 deletion
+25
-13
src/storage/access/ob_table_scan_iterator.cpp
src/storage/access/ob_table_scan_iterator.cpp
+11
-6
src/storage/ob_value_row_iterator.cpp
src/storage/ob_value_row_iterator.cpp
+14
-7
未找到文件。
src/storage/access/ob_table_scan_iterator.cpp
浏览文件 @
74a77359
...
...
@@ -563,13 +563,18 @@ int ObTableScanIterator::check_txn_status_if_read_uncommitted_()
{
int
ret
=
OB_SUCCESS
;
auto
&
acc_ctx
=
ctx_guard_
.
get_store_ctx
().
mvcc_acc_ctx_
;
auto
&
snapshot
=
acc_ctx
.
snapshot_
;
if
(
snapshot
.
tx_id_
.
is_valid
()
&&
acc_ctx
.
mem_ctx_
)
{
if
(
acc_ctx
.
snapshot_
.
tx_id_
.
is_valid
()
&&
acc_ctx
.
mem_ctx_
)
{
if
(
acc_ctx
.
mem_ctx_
->
is_tx_rollbacked
())
{
// The txn has been killed during normal processing. So we return
// OB_TRANS_KILLED to prompt this abnormal state.
ret
=
OB_TRANS_KILLED
;
STORAGE_LOG
(
WARN
,
"txn termianted when table scan"
,
K
(
ret
),
K
(
acc_ctx
));
if
(
acc_ctx
.
mem_ctx_
->
is_for_replay
())
{
// goes here means the txn was killed due to LS's GC etc,
// return NOT_MASTER
ret
=
OB_NOT_MASTER
;
}
else
{
// The txn has been killed during normal processing. So we return
// OB_TRANS_KILLED to prompt this abnormal state.
ret
=
OB_TRANS_KILLED
;
STORAGE_LOG
(
WARN
,
"txn has terminated"
,
K
(
ret
),
"tx_id"
,
acc_ctx
.
tx_id_
);
}
}
}
return
ret
;
...
...
src/storage/ob_value_row_iterator.cpp
浏览文件 @
74a77359
...
...
@@ -293,13 +293,20 @@ int ObSingleRowGetter::get_next_row(ObNewRow *&row)
}
if
(
OB_SUCC
(
ret
)
||
OB_ITER_END
==
ret
)
{
// check txn status not aborted, which cause readout incorrect result
if
(
store_ctx_
->
mvcc_acc_ctx_
.
snapshot_
.
tx_id_
.
is_valid
()
&&
store_ctx_
->
mvcc_acc_ctx_
.
mem_ctx_
&&
store_ctx_
->
mvcc_acc_ctx_
.
mem_ctx_
->
is_tx_rollbacked
())
{
// The txn has been killed during normal processing. So we return
// OB_TRANS_KILLED to prompt this abnormal state.
ret
=
OB_TRANS_KILLED
;
STORAGE_LOG
(
WARN
,
"txn has terminated"
,
K
(
ret
));
auto
&
acc_ctx
=
store_ctx_
->
mvcc_acc_ctx_
;
if
(
acc_ctx
.
snapshot_
.
tx_id_
.
is_valid
()
&&
acc_ctx
.
mem_ctx_
&&
acc_ctx
.
mem_ctx_
->
is_tx_rollbacked
())
{
if
(
acc_ctx
.
mem_ctx_
->
is_for_replay
())
{
// goes here means the txn was killed due to LS's GC etc,
// return NOT_MASTER
ret
=
OB_NOT_MASTER
;
}
else
{
// The txn has been killed during normal processing. So we return
// OB_TRANS_KILLED to prompt this abnormal state.
ret
=
OB_TRANS_KILLED
;
STORAGE_LOG
(
WARN
,
"txn has terminated"
,
K
(
ret
),
"tx_id"
,
acc_ctx
.
tx_id_
);
}
}
}
return
ret
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录