Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
oceanbase
oceanbase
提交
86370d23
O
oceanbase
项目概览
oceanbase
/
oceanbase
9 个月 前同步成功
通知
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 搜索 >>
提交
86370d23
编写于
12月 02, 2021
作者:
H
handora
提交者:
LINGuanRen
12月 02, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[BUG] fix report error msg from sql recheck
上级
74e3e4cb
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
31 addition
and
9 deletion
+31
-9
src/storage/ob_partition_storage.cpp
src/storage/ob_partition_storage.cpp
+31
-9
未找到文件。
src/storage/ob_partition_storage.cpp
浏览文件 @
86370d23
...
...
@@ -1924,6 +1924,7 @@ int ObPartitionStorage::check_old_row_legitimacy(ObDMLRunningCtx &run_ctx, const
if
(
OB_ITER_END
==
ret
)
{
ret
=
OB_ERR_DEFENSIVE_CHECK
;
LOG_WARN
(
"old row in storage is not exists"
,
K
(
ret
));
check_leader_changed_for_sql_recheck_
(
run_ctx
,
ret
);
}
else
{
LOG_WARN
(
"get next row from old_row_iter failed"
,
K
(
ret
),
KPC
(
run_ctx
.
column_ids_
),
K
(
old_row
));
}
...
...
@@ -1961,6 +1962,8 @@ int ObPartitionStorage::check_old_row_legitimacy(ObDMLRunningCtx &run_ctx, const
K
(
column_ids
.
at
(
i
)));
ret
=
OB_ERR_DEFENSIVE_CHECK
;
}
check_leader_changed_for_sql_recheck_
(
run_ctx
,
ret
);
}
if
(
OB_ERR_DEFENSIVE_CHECK
==
ret
)
{
ObString
func_name
=
ObString
::
make_string
(
"check_old_row_legitimacy"
);
...
...
@@ -3121,15 +3124,18 @@ int ObPartitionStorage::process_old_row(ObDMLRunningCtx& run_ctx, const bool dat
STORAGE_LOG
(
WARN
,
"failed to check rowkey existing"
,
K
(
*
idx_row
),
K
(
ret
));
}
else
if
(
!
exists
)
{
ret
=
OB_ERR_DEFENSIVE_CHECK
;
ObString
func_name
=
ObString
::
make_string
(
"process_old_row"
);
LOG_USER_ERROR
(
OB_ERR_DEFENSIVE_CHECK
,
func_name
.
length
(),
func_name
.
ptr
());
STORAGE_LOG
(
ERROR
,
"Unexpected old row, update or delete a non exist index row"
,
K
(
ret
),
KPC
(
idx_row
),
K
(
relative_tables
.
data_table_
.
tables_handle_
),
K
(
relative_tables
.
index_tables_
[
i
]),
K
(
relative_tables
.
index_tables_
[
i
].
tables_handle_
));
check_leader_changed_for_sql_recheck_
(
run_ctx
,
ret
);
if
(
OB_FAIL
(
ret
))
{
ObString
func_name
=
ObString
::
make_string
(
"process_old_row"
);
LOG_USER_ERROR
(
OB_ERR_DEFENSIVE_CHECK
,
func_name
.
length
(),
func_name
.
ptr
());
STORAGE_LOG
(
ERROR
,
"Unexpected old row, update or delete a non exist index row"
,
K
(
ret
),
KPC
(
idx_row
),
K
(
relative_tables
.
data_table_
.
tables_handle_
),
K
(
relative_tables
.
index_tables_
[
i
]),
K
(
relative_tables
.
index_tables_
[
i
].
tables_handle_
));
}
}
else
{
// STORAGE_LOG(INFO, "build index row", K(*idx_row), K(null_idx_val), K(type));
if
(
ND_ROWKEY_CHANGE
==
type
&&
!
null_idx_val
)
{
...
...
@@ -7867,5 +7873,21 @@ void ObPartitionStorage::handle_error_index_table(
}
}
void
ObPartitionStorage
::
check_leader_changed_for_sql_recheck_
(
ObDMLRunningCtx
&
run_ctx
,
int
&
ret
)
{
if
(
OB_ERR_DEFENSIVE_CHECK
==
ret
)
{
if
(
run_ctx
.
store_ctx_
.
mem_ctx_
!=
NULL
)
{
ObMemtableCtx
*
curr_mt_ctx
=
static_cast
<
ObMemtableCtx
*>
(
run_ctx
.
store_ctx_
.
mem_ctx_
);
transaction
::
ObTransCtx
*
trans_ctx
=
curr_mt_ctx
->
get_trans_ctx
();
if
(
NULL
!=
trans_ctx
)
{
if
(
!
trans_ctx
->
is_bounded_staleness_read
()
&&
curr_mt_ctx
->
is_for_replay
())
{
TRANS_LOG
(
WARN
,
"strong consistent read follower when sql check"
,
K
(
trans_ctx
->
get_trans_id
()));
ret
=
OB_NOT_MASTER
;
}
}
}
}
}
}
// namespace storage
}
// namespace oceanbase
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录